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