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