config.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED
  2. #define BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED
  3. // Copyright 2016 Peter Dimov.
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. //
  7. // See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt
  9. #include <boost/config.hpp>
  10. #include <boost/config/workaround.hpp>
  11. #if defined( BOOST_NO_CXX11_CONSTEXPR )
  12. # define BOOST_MP11_NO_CONSTEXPR
  13. #elif defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1920 )
  14. # define BOOST_MP11_NO_CONSTEXPR
  15. #endif
  16. #if defined(__cpp_fold_expressions) && __cpp_fold_expressions >= 201603
  17. # define BOOST_MP11_HAS_FOLD_EXPRESSIONS
  18. #elif defined(BOOST_CLANG) && defined(__has_cpp_attribute)
  19. # if __has_cpp_attribute(fallthrough) && __cplusplus >= 201406L // Clang 3.9+ in c++1z mode
  20. # define BOOST_MP11_HAS_FOLD_EXPRESSIONS
  21. # endif
  22. #endif
  23. #if defined(__has_builtin)
  24. # if __has_builtin(__type_pack_element)
  25. # define BOOST_MP11_HAS_TYPE_PACK_ELEMENT
  26. # endif
  27. #endif
  28. #endif // #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED