#ifdef constexpr tests on msvc and clang c++11

This commit is contained in:
Peter Dimov
2017-06-18 04:21:22 +03:00
parent 9c18322e85
commit 4341446e04
2 changed files with 32 additions and 0 deletions

View File

@ -9,8 +9,24 @@
//
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#define HAVE_CONSTEXPR_INIT
#if defined( BOOST_NO_CXX11_CONSTEXPR )
# undef HAVE_CONSTEXPR_INIT
#endif
#if BOOST_WORKAROUND( BOOST_MSVC, <= 1910 )
# undef HAVE_CONSTEXPR_INIT
#endif
#if defined(__clang__) && defined( BOOST_NO_CXX14_CONSTEXPR )
// Clang 4+ in C++11 mode works too, but how to detect it?
# undef HAVE_CONSTEXPR_INIT
#endif
#if !defined( HAVE_CONSTEXPR_INIT )
int main()
{

View File

@ -9,8 +9,24 @@
//
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#define HAVE_CONSTEXPR_INIT
#if defined( BOOST_NO_CXX11_CONSTEXPR )
# undef HAVE_CONSTEXPR_INIT
#endif
#if BOOST_WORKAROUND( BOOST_MSVC, <= 1910 )
# undef HAVE_CONSTEXPR_INIT
#endif
#if defined(__clang__) && defined( BOOST_NO_CXX14_CONSTEXPR )
// Clang 4+ in C++11 mode works too, but how to detect it?
# undef HAVE_CONSTEXPR_INIT
#endif
#if !defined( HAVE_CONSTEXPR_INIT )
int main()
{