williamr@2: /* williamr@2: * Copyright (c) 1998 williamr@2: * Silicon Graphics Computer Systems, Inc. williamr@2: * williamr@2: * Copyright (c) 1999 williamr@2: * Boris Fomitchev williamr@2: * williamr@2: * This material is provided "as is", with absolutely no warranty expressed williamr@2: * or implied. Any use is at your own risk. williamr@2: * williamr@2: * Permission to use or copy this software for any purpose is hereby granted williamr@2: * without fee, provided the above notices are retained on all copies. williamr@2: * Permission to modify the code and to distribute modified code is granted, williamr@2: * provided the above notices are retained, and a notice that the code was williamr@2: * modified is included with the above copyright notice. williamr@2: * williamr@2: */ williamr@2: williamr@2: #ifndef _STLP_BITSET williamr@2: #define _STLP_BITSET williamr@2: williamr@2: // This implementation of bitset<> has a second template parameter, williamr@2: // _WordT, which defaults to unsigned long. *YOU SHOULD NOT USE williamr@2: // THIS FEATURE*. It is experimental, and it may be removed in williamr@2: // future releases. williamr@2: williamr@2: // A bitset of size N, using words of type _WordT, will have williamr@2: // N % (sizeof(_WordT) * CHAR_BIT) unused bits. (They are the high- williamr@2: // order bits in the highest word.) It is a class invariant williamr@2: // of class bitset<> that those unused bits are always zero. williamr@2: williamr@2: // Most of the actual code isn't contained in bitset<> itself, but in the williamr@2: // base class _Base_bitset. The base class works with whole words, not with williamr@2: // individual bits. This allows us to specialize _Base_bitset for the williamr@2: // important special case where the bitset is only a single word. williamr@2: williamr@2: // The C++ standard does not define the precise semantics of operator[]. williamr@2: // In this implementation the const version of operator[] is equivalent williamr@2: // to test(), except that it does no range checking. The non-const version williamr@2: // returns a reference to a bit, again without doing any range checking. williamr@2: williamr@2: # ifndef _STLP_OUTERMOST_HEADER_ID williamr@2: # define _STLP_OUTERMOST_HEADER_ID 0x2 williamr@2: # include williamr@2: # endif williamr@2: williamr@2: #ifdef _STLP_PRAGMA_ONCE williamr@2: # pragma once williamr@2: #endif williamr@2: williamr@2: # include williamr@2: williamr@2: # if (_STLP_OUTERMOST_HEADER_ID == 0x2 ) williamr@2: # include williamr@2: # undef _STLP_OUTERMOST_HEADER_ID williamr@2: # endif williamr@2: williamr@2: #endif /* _STLP_BITSET */ williamr@2: williamr@2: williamr@2: // Local Variables: williamr@2: // mode:C++ williamr@2: // End: williamr@2: