forked from boostorg/fusion
More constexpr and noexcept support.
Note 1: Forwarding functions are specified as a C++14 constexpr since std::forward is not a constexpr within C++11. Note 2: Though I'm not sure why it doesn't compile, some declarations are specified as a C++14 constexpr or non-constexpr. Note 3: Boost.Tuple adaptation and TR1-based tuple implementations are not constexpr.
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/container/set/set.hpp>
|
||||
#include <boost/fusion/support/detail/as_fusion_element.hpp>
|
||||
#include <boost/fusion/support/pair.hpp>
|
||||
@ -35,6 +36,7 @@
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#define FUSION_HASH #
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
@ -57,7 +59,22 @@ namespace boost { namespace fusion
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED inline set<>
|
||||
// XXX:
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
FUSION_HASH if defined(BOOST_CLANG)
|
||||
BOOST_CXX14_CONSTEXPR
|
||||
FUSION_HASH else
|
||||
BOOST_CONSTEXPR
|
||||
FUSION_HASH endif
|
||||
#else
|
||||
#if defined(BOOST_CLANG)
|
||||
BOOST_CXX14_CONSTEXPR
|
||||
#else
|
||||
BOOST_CONSTEXPR
|
||||
#endif
|
||||
#endif
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline set<>
|
||||
make_set()
|
||||
{
|
||||
return set<>();
|
||||
@ -76,6 +93,7 @@ namespace boost { namespace fusion
|
||||
}}
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#undef FUSION_HASH
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
@ -103,7 +121,7 @@ namespace boost { namespace fusion
|
||||
}
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline set<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
|
||||
make_set(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg))
|
||||
{
|
||||
|
Reference in New Issue
Block a user