2 // Boost general library 'format' ---------------------------
3 // See http://www.boost.org for updates, documentation, and revision history.
5 // (C) Samuel Krempp 2001
6 // Permission to copy, use, modify, sell and
7 // distribute this software is granted provided this copyright notice appears
8 // in all copies. This software is provided "as is" without express or implied
9 // warranty, and with no claim as to its suitability for any purpose.
11 // ------------------------------------------------------------------------------
12 // config_macros.hpp : configuration macros for the format library
13 // only BOOST_IO_STD is absolutely needed. other are just used to trigger workaround
14 // codes here and there.
15 // ------------------------------------------------------------------------------
17 #ifndef BOOST_FORMAT_CONFIG_MACROS_HPP
18 #define BOOST_FORMAT_CONFIG_MACROS_HPP
20 #include <boost/config.hpp>
21 #include <boost/detail/workaround.hpp>
23 // make sure our local macros wont override something :
24 #if defined(BOOST_NO_LOCALE_ISDIGIT) || defined(BOOST_OVERLOAD_FOR_NON_CONST) \
25 || defined(BOOST_IO_STD) || defined( BOOST_IO_NEEDS_USING_DECLARATION )
26 #error "boost::format defines a local macro that would overwrite a previously defined macro."
29 // specific workarounds. each header can define BOOS_IO_STD if it
30 // needs. (e.g. because of IO_NEEDS_USING_DECLARATION)
31 #include <boost/format/detail/workarounds_gcc-2.95.hpp>
32 #include <boost/format/detail/workarounds_stlport.hpp> // stlport workarounds
35 # define BOOST_IO_STD std::
38 #if defined(BOOST_NO_STD_LOCALE) || \
39 ( BOOST_WORKAROUND(__BORLANDC__, <= 0x564) \
40 || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x570 ) ) )
41 // some future __BORLANDC__ >0x564 versions might not need this
42 // 0x570 is Borland's kylix branch
43 #define BOOST_NO_LOCALE_ISIDIGIT
46 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
47 #define BOOST_NO_OVERLOAD_FOR_NON_CONST
50 // gcc-2.95's stringstream is not usable, unless it's the one from STLPORT :
51 #if BOOST_WORKAROUND(__GNUC__, < 3) && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
52 #define BOOST_FORMAT_IGNORE_STRINGSTREAM
56 // **** Workaround for io streams, stlport and msvc.
57 #ifdef BOOST_IO_NEEDS_USING_DECLARATION
59 using std::char_traits;
60 using std::basic_ostream;
61 using std::basic_ostringstream;
63 using std::basic_ostream;
66 using std::basic_ostream;
67 using std::basic_ostringstream;
73 // ------------------------------------------------------------------------------
75 #endif // BOOST_FORMAT_MACROS_DEFAULT_HPP