epoc32/include/stdapis/stlportv5/bitset
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
 * Copyright (c) 1998
williamr@2
     3
 * Silicon Graphics Computer Systems, Inc.
williamr@2
     4
 *
williamr@4
     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@4
    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@4
    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@4
    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@4
    42
#ifndef _STLP_OUTERMOST_HEADER_ID
williamr@2
    43
#  define _STLP_OUTERMOST_HEADER_ID 0x2
williamr@2
    44
#  include <stl/_prolog.h>
williamr@4
    45
#endif
williamr@2
    46
williamr@2
    47
#ifdef _STLP_PRAGMA_ONCE
williamr@4
    48
#  pragma once
williamr@2
    49
#endif
williamr@2
    50
williamr@4
    51
#include <stl/_bitset.h>
williamr@2
    52
williamr@4
    53
#if (_STLP_OUTERMOST_HEADER_ID == 0x2 )
williamr@2
    54
#  include <stl/_epilog.h>
williamr@2
    55
#  undef _STLP_OUTERMOST_HEADER_ID
williamr@4
    56
#endif
williamr@2
    57
williamr@2
    58
#endif /* _STLP_BITSET */
williamr@2
    59
williamr@2
    60
// Local Variables:
williamr@2
    61
// mode:C++
williamr@2
    62
// End:
williamr@2
    63