config.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // -----------------------------------------------------------
  2. //
  3. // Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
  4. // Copyright (c) 2003-2006, 2008, 2025 Gennaro Prota
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // (See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // -----------------------------------------------------------
  11. #ifndef BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424
  12. #define BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424
  13. #include "boost/config.hpp"
  14. // no-op function to workaround gcc bug c++/8419
  15. //
  16. namespace boost {
  17. namespace detail {
  18. template< typename T >
  19. T
  20. make_non_const( T t )
  21. {
  22. return t;
  23. }
  24. }
  25. }
  26. #if defined( __GNUC__ )
  27. # define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT( expr ) \
  28. ( boost::detail::make_non_const( expr ) )
  29. #else
  30. # define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT( expr ) ( expr )
  31. #endif
  32. #if ! defined( BOOST_NO_CXX11_HDR_FUNCTIONAL ) && ! defined( BOOST_DYNAMIC_BITSET_NO_STD_HASH )
  33. # define BOOST_DYNAMIC_BITSET_SPECIALIZE_STD_HASH
  34. #endif
  35. #if ( defined( _MSVC_LANG ) && _MSVC_LANG >= 201703L ) || __cplusplus >= 201703L
  36. # define BOOST_DYNAMIC_BITSET_USE_CPP17_OR_LATER
  37. #endif
  38. #if ( defined( _MSVC_LANG ) && _MSVC_LANG >= 202002L ) || __cplusplus >= 202002L
  39. # define BOOST_DYNAMIC_BITSET_CONSTEXPR20 constexpr
  40. #else
  41. # define BOOST_DYNAMIC_BITSET_CONSTEXPR20
  42. #endif
  43. #endif // include guard