Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 // ----------------------------------------------------------------------------
0003 // config_macros.hpp : configuration macros for the format library
0004 // only BOOST_IO_STD is absolutely needed (it should be 'std::' in general)
0005 // others are compiler-specific workaround macros used in #ifdef switches
0006 // ----------------------------------------------------------------------------
0007 
0008 //  Copyright Samuel Krempp 2003. Use, modification, and distribution are
0009 //  subject to the Boost Software License, Version 1.0. (See accompanying
0010 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0011 
0012 // see http://www.boost.org/libs/format for library home page
0013 
0014 
0015 // ----------------------------------------------------------------------------
0016 
0017 #ifndef BOOST_FORMAT_CONFIG_MACROS_HPP
0018 #define BOOST_FORMAT_CONFIG_MACROS_HPP
0019 
0020 #include <boost/config.hpp>
0021 #include <boost/detail/workaround.hpp>
0022 
0023 // make sure our local macros wont override something :
0024 #if defined(BOOST_NO_LOCALE_ISDIGIT) || defined(BOOST_OVERLOAD_FOR_NON_CONST) \
0025   || defined(BOOST_IO_STD) || defined( BOOST_IO_NEEDS_USING_DECLARATION ) \
0026     || defined(BOOST_NO_TEMPLATE_STD_STREAM) \
0027     || defined(BOOST_FORMAT_STREAMBUF_DEFINED) || defined(BOOST_FORMAT_OSTREAM_DEFINED)
0028 #error "boost::format uses a local macro that is already defined."
0029 #endif
0030 
0031 // specific workarounds. each header can define BOOS_IO_STD if it 
0032 // needs. (e.g. because of IO_NEEDS_USING_DECLARATION)
0033 #include <boost/format/detail/workarounds_gcc-2_95.hpp>
0034 #include <boost/format/detail/workarounds_stlport.hpp>
0035 
0036 #ifndef BOOST_IO_STD
0037 #  define BOOST_IO_STD ::std::
0038 #endif
0039 
0040 #if defined(BOOST_NO_STD_LOCALE) || \
0041  ( BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x564) \
0042    || BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT( 0x570 ) )  )
0043 // some future BOOST_BORLANDC >0x564  versions might not need this
0044 // 0x570 is Borland's kylix branch
0045 #define BOOST_NO_LOCALE_ISDIGIT
0046 #endif
0047 
0048 #if  BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
0049 #define BOOST_NO_OVERLOAD_FOR_NON_CONST
0050 #endif
0051 
0052 // **** Workaround for io streams, stlport and msvc.
0053 #ifdef BOOST_IO_NEEDS_USING_DECLARATION
0054 namespace boost {
0055   using std::char_traits;
0056   using std::basic_ostream;
0057   namespace io {
0058     using std::basic_ostream;
0059     namespace detail {
0060       using std::basic_ios;
0061       using std::basic_ostream;
0062     }
0063   }
0064 #if ! defined(BOOST_NO_STD_LOCALE)
0065     using std::locale;
0066     namespace io {
0067         using std::locale;
0068         namespace detail {
0069             using std::locale;
0070         }
0071     }
0072 #endif // locale
0073 }
0074   // -end N.S. boost
0075 #endif // needs_using_declaration
0076 
0077 #if ! defined(BOOST_NO_STD_LOCALE)
0078 #include <locale>
0079 #endif
0080 
0081 
0082 // ***  hide std::locale if it doesnt exist. 
0083 // this typedef is either std::locale or int, avoids placing ifdefs everywhere
0084 namespace boost { namespace io { namespace detail {
0085 #if ! defined(BOOST_NO_STD_LOCALE)
0086     typedef BOOST_IO_STD locale locale_t;
0087 #else 
0088     typedef int          locale_t;
0089 #endif
0090 } } }
0091 
0092 
0093 // ----------------------------------------------------------------------------
0094 
0095 #endif // BOOST_FORMAT_MACROS_DEFAULT_HPP