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