1 /* 2 * Copyright (c) 1998 3 * Silicon Graphics Computer Systems, Inc. 4 * 5 * Copyright (c) 1999 6 * Boris Fomitchev 7 * 8 * This material is provided "as is", with absolutely no warranty expressed 9 * or implied. Any use is at your own risk. 10 * 11 * Permission to use or copy this software for any purpose is hereby granted 12 * without fee, provided the above notices are retained on all copies. 13 * Permission to modify the code and to distribute modified code is granted, 14 * provided the above notices are retained, and a notice that the code was 15 * modified is included with the above copyright notice. 16 * 17 */ 18 19 #ifndef _STLP_BITSET 20 21 // This implementation of bitset<> has a second template parameter, 22 // _WordT, which defaults to unsigned long. *YOU SHOULD NOT USE 23 // THIS FEATURE*. It is experimental, and it may be removed in 24 // future releases. 25 26 // A bitset of size N, using words of type _WordT, will have 27 // N % (sizeof(_WordT) * CHAR_BIT) unused bits. (They are the high- 28 // order bits in the highest word.) It is a class invariant 29 // of class bitset<> that those unused bits are always zero. 30 31 // Most of the actual code isn't contained in bitset<> itself, but in the 32 // base class _Base_bitset. The base class works with whole words, not with 33 // individual bits. This allows us to specialize _Base_bitset for the 34 // important special case where the bitset is only a single word. 35 36 // The C++ standard does not define the precise semantics of operator[]. 37 // In this implementation the const version of operator[] is equivalent 38 // to test(), except that it does no range checking. The non-const version 39 // returns a reference to a bit, again without doing any range checking. 40 41 #ifndef _STLP_OUTERMOST_HEADER_ID 42 # define _STLP_OUTERMOST_HEADER_ID 0x2 43 # include <stl/_prolog.h> 44 # define _STLP_BITSET 45 #endif 46 47 #if (_STLP_OUTERMOST_HEADER_ID == 0x2) 48 # ifndef _STLP_INTERNAL_BITSET 49 # include <stl/_bitset.h> 50 # endif 51 #endif 52 53 #if (_STLP_OUTERMOST_HEADER_ID != 0x2) || defined (_STLP_IMPORT_VENDOR_STD) 54 # if defined (_STLP_HAS_INCLUDE_NEXT) 55 # include_next <bitset> 56 # else 57 # include _STLP_NATIVE_HEADER(bitset) 58 # endif 59 #endif 60 61 #if (_STLP_OUTERMOST_HEADER_ID == 0x2 ) 62 # include <stl/_epilog.h> 63 # undef _STLP_OUTERMOST_HEADER_ID 64 #endif 65 66 #endif /* _STLP_BITSET */ 67 68 // Local Variables: 69 // mode:C++ 70 // End: 71