Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

Bitmask Types

Module:  Standard C++ Library   Library:  Input/output

Local Index

No Entries

Summary

A Bitmask type is an integer type, including an enumerated type or an assignable, copy constructible, and equality comparable class type, for which the following bitwise operators are defined:

Distinct values of a bitmask type such that for any pair Ci and Cj, (Ci & Ci) != T() and (Ci & Cj) == T(), are elements of the bitmask type. Informally speaking, no two elements of a bitmask type have any overlapping bits.

Note that since a bitmask type need not be implemented as an integer type, there may not be an implicit conversion from an integer type to a bitmask type. Specifically, assigning any integer to a bitmask type need not be well-formed and may cause compilation errors. In order to initialize an object X of a bitmask type T to have none of its bits set, the object should be initialized as follows: T X = T () (not T X = 0).

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems -- Programming Language C++, Library Introduction, Section 17.3.2.1.2.



Previous fileTop of DocumentContentsIndex pageNext file

Copyright (c) 1994-2006 Rogue Wave Software, a Quovadx Division.
Licensed under the Apache License, Version 2.0.
Contact Rogue Wave about documentation or support issues. You can also seek help from other developers through the Apache stdcxx community (see below).

For more information on the Rogue Wave Standard C++ Library under open source, see Section 1.2 of the user's guide.