Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:45

0001 // -----------------------------------------------------------
0002 //
0003 //   Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
0004 //        Copyright (c) 2003-2006, 2008 Gennaro Prota
0005 //
0006 // Distributed under the Boost Software License, Version 1.0.
0007 //    (See accompanying file LICENSE_1_0.txt or copy at
0008 //          http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 // -----------------------------------------------------------
0011 
0012 #ifndef BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424
0013 #define BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424
0014 
0015 #include "boost/config.hpp"
0016 #include "boost/detail/workaround.hpp"
0017 
0018 // support for pre 3.0 libstdc++ - thanks Phil Edwards!
0019 #if defined (__STL_CONFIG_H) && !defined (__STL_USE_NEW_IOSTREAMS)
0020 # define BOOST_OLD_IOSTREAMS
0021 #endif
0022 
0023 // no-op function to workaround gcc bug c++/8419
0024 //
0025 namespace boost { namespace detail {
0026     template <typename T> T make_non_const(T t) { return t; }
0027 }}
0028 
0029 #if defined(__GNUC__)
0030 # define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(expr) \
0031          (boost::detail::make_non_const(expr))
0032 #else
0033 # define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(expr) (expr)
0034 #endif
0035 
0036 //
0037 #if (defined BOOST_BORLANDC && BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)))  \
0038                              || (defined BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
0039 #define BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS
0040 #endif
0041 
0042 // if we can't use friends then we simply expose private members
0043 //
0044 #if defined(BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS)
0045 #define BOOST_DYNAMIC_BITSET_PRIVATE public
0046 #else
0047 #define BOOST_DYNAMIC_BITSET_PRIVATE private
0048 #endif
0049 
0050 // A couple of macros to cope with libraries without locale
0051 // support. The first macro must be used to declare a reference
0052 // to a ctype facet. The second one to widen a char by using
0053 // that ctype object. If facets and locales aren't available
0054 // the first macro is a no-op and the second one just expands
0055 // to its parameter c.
0056 //
0057 #if defined (BOOST_USE_FACET)
0058 
0059 #define BOOST_DYNAMIC_BITSET_CTYPE_FACET(ch, name, loc)     \
0060             const std::ctype<ch> & name =                   \
0061             BOOST_USE_FACET(std::ctype<ch>, loc)         /**/
0062 
0063 #define BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, c)             \
0064            (fac.widen(c))
0065 #else
0066 
0067 #define BOOST_DYNAMIC_BITSET_CTYPE_FACET(ch, name, loc) /**/
0068 #define BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, c)          c
0069 
0070 #endif
0071 
0072 #endif // include guard