// Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
// The Flags class provides a type-safe way of storing OR-combinations of enum // values. The Flags<T, S> class is a template class, where T is an enum type, // and S is the underlying storage type (usually int). // // The traditional C++ approach for storing OR-combinations of enum values is to // use an int or unsigned int variable. The inconvenience with this approach is // that there's no type checking at all; any enum value can be OR'd with any // other enum value and passed on to a function that takes an int or unsigned // int. template <typename T, typename S = int> class Flags final { public: using flag_type = T; using mask_type = S;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.