epoc32/include/stdapis/boost/dynamic_bitset/config.hpp
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
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.
     1 // --------------------------------------------------
     2 //
     3 // (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002.
     4 // (C) Copyright Gennaro Prota                 2003 - 2004.
     5 //
     6 // Distributed under the Boost Software License, Version 1.0.
     7 //    (See accompanying file LICENSE_1_0.txt or copy at
     8 //          http://www.boost.org/LICENSE_1_0.txt)
     9 //
    10 // -----------------------------------------------------------
    11 
    12 //  See http://www.boost.org/libs/dynamic_bitset for documentation.
    13 
    14 
    15 #ifndef BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424
    16 #define BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424
    17 
    18 #include "boost/config.hpp"
    19 #include "boost/detail/workaround.hpp"
    20 
    21 // support for pre 3.0 libstdc++ - thanks Phil Edwards!
    22 #if defined (__STL_CONFIG_H) && !defined (__STL_USE_NEW_IOSTREAMS)
    23 # define BOOST_OLD_IOSTREAMS
    24 #endif
    25 
    26 // this should be in the config system some day
    27 // see http://lists.boost.org/MailArchives/boost/msg62291.php
    28 #define BOOST_DYNAMIC_BITSET_GNUC_VERSION  (  __GNUC__       * 100 * 100     \
    29                                             + __GNUC_MINOR__ * 100)
    30 
    31 // workaround for gcc bug c++/8419 - gps
    32 
    33 namespace boost { namespace detail {
    34     template <typename T> T make_non_const(T t) { return t; }
    35 }}
    36 
    37 #if defined(__GNUC__) && BOOST_WORKAROUND(BOOST_DYNAMIC_BITSET_GNUC_VERSION, \
    38                                           BOOST_TESTED_AT(30300))
    39 # define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(expr) \
    40          (boost::detail::make_non_const(expr))
    41 #else
    42 # define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(expr) (expr)
    43 #endif
    44 
    45 //
    46 #if (defined __BORLANDC__ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)))  \
    47                              || (defined BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
    48 #define BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS
    49 #endif
    50 
    51 // if we can't use friends then private members are exposed
    52 //
    53 #if defined(BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS)
    54 #define BOOST_DYNAMIC_BITSET_PRIVATE public
    55 #else
    56 #define BOOST_DYNAMIC_BITSET_PRIVATE private
    57 #endif
    58 
    59 // A couple of macros to cope with libraries without locale
    60 // support. The first macro must be used to declare a reference
    61 // to a ctype facet. The second one to widen a char by using
    62 // that ctype object. If facets and locales aren't available
    63 // the first macro is a no-op and the second one just expands
    64 // to its parameter c.
    65 //
    66 #if defined (BOOST_USE_FACET)
    67 
    68 #define BOOST_DYNAMIC_BITSET_CTYPE_FACET(ch, name, loc)     \
    69             const std::ctype<ch> & name =                   \
    70             BOOST_USE_FACET(std::ctype<ch>, loc)         /**/
    71 
    72 #define BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, c)             \
    73            (fac.widen(c))
    74 #else
    75 
    76 #define BOOST_DYNAMIC_BITSET_CTYPE_FACET(ch, name, loc) /**/
    77 #define BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, c)          c
    78 
    79 #endif
    80 
    81 #endif // include guard