/Src/Dependencies/Boost/boost/format/detail/config_macros.hpp

http://hadesmem.googlecode.com/ · C++ Header · 97 lines · 56 code · 19 blank · 22 comment · 11 complexity · 6a4ca12ecf51c3a442c7d3233dcb1fab MD5 · raw file

  1. // -*- C++ -*-
  2. // ----------------------------------------------------------------------------
  3. // config_macros.hpp : configuration macros for the format library
  4. // only BOOST_IO_STD is absolutely needed (it should be 'std::' in general)
  5. // others are compiler-specific workaround macros used in #ifdef switches
  6. // ----------------------------------------------------------------------------
  7. // Copyright Samuel Krempp 2003. Use, modification, and distribution are
  8. // subject to the Boost Software License, Version 1.0. (See accompanying
  9. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  10. // see http://www.boost.org/libs/format for library home page
  11. // ----------------------------------------------------------------------------
  12. #ifndef BOOST_FORMAT_CONFIG_MACROS_HPP
  13. #define BOOST_FORMAT_CONFIG_MACROS_HPP
  14. #include <boost/config.hpp>
  15. #include <boost/detail/workaround.hpp>
  16. // make sure our local macros wont override something :
  17. #if defined(BOOST_NO_LOCALE_ISDIGIT) || defined(BOOST_OVERLOAD_FOR_NON_CONST) \
  18. || defined(BOOST_IO_STD) || defined( BOOST_IO_NEEDS_USING_DECLARATION ) \
  19. || defined(BOOST_NO_TEMPLATE_STD_STREAM) \
  20. || defined(BOOST_FORMAT_STREAMBUF_DEFINED) || defined(BOOST_FORMAT_OSTREAM_DEFINED)
  21. #error "boost::format uses a local macro that is already defined."
  22. #endif
  23. // specific workarounds. each header can define BOOS_IO_STD if it
  24. // needs. (e.g. because of IO_NEEDS_USING_DECLARATION)
  25. #include <boost/format/detail/workarounds_gcc-2_95.hpp>
  26. #include <boost/format/detail/workarounds_stlport.hpp>
  27. #ifndef BOOST_IO_STD
  28. # define BOOST_IO_STD ::std::
  29. #endif
  30. #if defined(BOOST_NO_STD_LOCALE) || \
  31. ( BOOST_WORKAROUND(__BORLANDC__, <= 0x564) \
  32. || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x570 ) ) )
  33. // some future __BORLANDC__ >0x564 versions might not need this
  34. // 0x570 is Borland's kylix branch
  35. #define BOOST_NO_LOCALE_ISDIGIT
  36. #endif
  37. #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
  38. #define BOOST_NO_OVERLOAD_FOR_NON_CONST
  39. #endif
  40. // gcc-2.95's native stringstream is not usable
  41. #if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
  42. #define BOOST_FORMAT_IGNORE_STRINGSTREAM
  43. #endif
  44. // **** Workaround for io streams, stlport and msvc.
  45. #ifdef BOOST_IO_NEEDS_USING_DECLARATION
  46. namespace boost {
  47. using std::char_traits;
  48. using std::basic_ostream;
  49. namespace io {
  50. using std::basic_ostream;
  51. namespace detail {
  52. using std::basic_ios;
  53. using std::basic_ostream;
  54. }
  55. }
  56. #if ! defined(BOOST_NO_STD_LOCALE)
  57. using std::locale;
  58. namespace io {
  59. using std::locale;
  60. namespace detail {
  61. using std::locale;
  62. }
  63. }
  64. #endif // locale
  65. }
  66. // -end N.S. boost
  67. #endif // needs_using_declaration
  68. // *** hide std::locale if it doesnt exist.
  69. // this typedef is either std::locale or int, avoids placing ifdefs everywhere
  70. namespace boost { namespace io { namespace detail {
  71. #if ! defined(BOOST_NO_STD_LOCALE)
  72. typedef BOOST_IO_STD locale locale_t;
  73. #else
  74. typedef int locale_t;
  75. #endif
  76. } } }
  77. // ----------------------------------------------------------------------------
  78. #endif // BOOST_FORMAT_MACROS_DEFAULT_HPP