diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index b0c2450..7c601b4 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -100,7 +101,7 @@ namespace detail template struct mp_count_impl; -#if !defined( BOOST_NO_CXX11_CONSTEXPR ) +#if !defined( BOOST_MP11_NO_CONSTEXPR ) constexpr std::size_t cx_plus() { @@ -136,7 +137,7 @@ namespace detail template class P> struct mp_count_if_impl; -#if !defined( BOOST_NO_CXX11_CONSTEXPR ) +#if !defined( BOOST_MP11_NO_CONSTEXPR ) template class L, class... T, template class P> struct mp_count_if_impl, P> { @@ -542,7 +543,7 @@ namespace detail template struct mp_find_index_impl; -#if !defined( BOOST_NO_CXX11_CONSTEXPR ) +#if !defined( BOOST_MP11_NO_CONSTEXPR ) template class L, class V> struct mp_find_index_impl, V> { @@ -602,7 +603,7 @@ namespace detail template class P> struct mp_find_index_if_impl; -#if !defined( BOOST_NO_CXX11_CONSTEXPR ) +#if !defined( BOOST_MP11_NO_CONSTEXPR ) template class L, template class P> struct mp_find_index_if_impl, P> { diff --git a/include/boost/mp11/detail/config.hpp b/include/boost/mp11/detail/config.hpp new file mode 100644 index 0000000..47cc3ba --- /dev/null +++ b/include/boost/mp11/detail/config.hpp @@ -0,0 +1,24 @@ +#ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED +#define BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED + +// Copyright 2016 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +#if defined( BOOST_NO_CXX11_CONSTEXPR ) + +# define BOOST_MP11_NO_CONSTEXPR + +#elif defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1900 ) + +# define BOOST_MP11_NO_CONSTEXPR + +#endif + +#endif // #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED