define_if_constexpr_macro.hpp 948 B

12345678910111213141516171819202122232425262728293031323334
  1. /* Copyright 2003-2022 Joaquin M Lopez Munoz.
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * See http://www.boost.org/libs/multi_index for library home page.
  7. */
  8. #if !defined(BOOST_CONFIG_HPP)
  9. #error <boost/config.hpp> must be included before this header
  10. #endif
  11. #if !defined(BOOST_MULTI_INDEX_DETAIL_UNDEF_IF_CONSTEXPR_MACRO)
  12. #if !defined(BOOST_NO_CXX17_IF_CONSTEXPR)
  13. #define BOOST_MULTI_INDEX_IF_CONSTEXPR if constexpr
  14. #else
  15. #define BOOST_MULTI_INDEX_IF_CONSTEXPR if
  16. #if defined(BOOST_MSVC)
  17. #define BOOST_MULTI_INDEX_DETAIL_C4127_DISABLED
  18. #pragma warning(push)
  19. #pragma warning(disable:4127) /* conditional expression is constant */
  20. #endif
  21. #endif
  22. #else
  23. #undef BOOST_MULTI_INDEX_IF_CONSTEXPR
  24. #if defined(BOOST_MULTI_INDEX_DETAIL_C4127_DISABLED)
  25. #pragma warning(pop)
  26. #undef BOOST_MULTI_INDEX_DETAIL_C4127_DISABLED
  27. #endif
  28. #endif