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