config.hpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright (c) 2009-2020 Vladimir Batov.
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. See http://www.boost.org/LICENSE_1_0.txt.
  4. #ifndef BOOST_CONVERT_FORWARD_HPP
  5. #define BOOST_CONVERT_FORWARD_HPP
  6. #include <boost/config.hpp>
  7. #include <boost/version.hpp>
  8. #include <boost/optional.hpp>
  9. #include <type_traits>
  10. #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
  11. #undef BOOST_CONVERT_CXX11
  12. #else
  13. #define BOOST_CONVERT_CXX11
  14. #endif
  15. // Intel 12.0 and lower have broken SFINAE
  16. #if defined(BOOST_INTEL) && (BOOST_INTEL <= 1200)
  17. # define BOOST_CONVERT_IS_NOT_SUPPORTED
  18. #endif
  19. // No C++11 support
  20. #if defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION <= 40600)
  21. # define BOOST_CONVERT_IS_NOT_SUPPORTED
  22. #endif
  23. // MSVC-11 and lower have broken SFINAE
  24. #if defined(BOOST_MSVC) && (BOOST_MSVC < 1800)
  25. # define BOOST_CONVERT_IS_NOT_SUPPORTED
  26. #endif
  27. #if defined(_MSC_VER)
  28. //MSVC++ 7.0 _MSC_VER == 1300
  29. //MSVC++ 7.1 _MSC_VER == 1310 (Visual Studio 2003)
  30. //MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005)
  31. //MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008)
  32. //MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010)
  33. //MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012)
  34. //MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013)
  35. //MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015)
  36. //MSVC++ 15.0 _MSC_VER == 1910 (Visual Studio 2017)
  37. # pragma warning(disable: 4100) // unreferenced formal parameter
  38. # pragma warning(disable: 4146) // unary minus operator applied to unsigned type
  39. # pragma warning(disable: 4180) // qualifier applied to function type has no meaning
  40. # pragma warning(disable: 4224)
  41. # pragma warning(disable: 4244)
  42. # pragma warning(disable: 4800) // forcing value to bool
  43. # pragma warning(disable: 4996)
  44. #if _MSC_VER < 1900 /* MSVC-14 defines real snprintf()... just about time! */
  45. # define snprintf _snprintf
  46. #endif
  47. #endif
  48. #endif // BOOST_CONVERT_FORWARD_HPP