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:
@ -21,7 +21,7 @@
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename First, typename Last, typename F>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline bool
|
||||
linear_all(First const&, Last const&, F const&, mpl::true_)
|
||||
{
|
||||
@ -29,12 +29,12 @@ namespace boost { namespace fusion { namespace detail
|
||||
}
|
||||
|
||||
template <typename First, typename Last, typename F>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline bool
|
||||
linear_all(First const& first, Last const& last, F& f, mpl::false_)
|
||||
{
|
||||
typename result_of::deref<First>::type x = *first;
|
||||
return f(x) &&
|
||||
return f(x) &&
|
||||
detail::linear_all(
|
||||
fusion::next(first)
|
||||
, last
|
||||
@ -43,7 +43,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
}
|
||||
|
||||
template <typename Sequence, typename F, typename Tag>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline bool
|
||||
all(Sequence const& seq, F f, Tag)
|
||||
{
|
||||
@ -60,11 +60,11 @@ namespace boost { namespace fusion { namespace detail
|
||||
struct unrolled_all
|
||||
{
|
||||
template <typename It, typename F>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static bool call(It const& it, F f)
|
||||
{
|
||||
return
|
||||
f(*it) &&
|
||||
return
|
||||
f(*it) &&
|
||||
f(*fusion::advance_c<1>(it))&&
|
||||
f(*fusion::advance_c<2>(it)) &&
|
||||
f(*fusion::advance_c<3>(it)) &&
|
||||
@ -76,11 +76,11 @@ namespace boost { namespace fusion { namespace detail
|
||||
struct unrolled_all<3>
|
||||
{
|
||||
template <typename It, typename F>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static bool call(It const& it, F f)
|
||||
{
|
||||
return
|
||||
f(*it) &&
|
||||
return
|
||||
f(*it) &&
|
||||
f(*fusion::advance_c<1>(it)) &&
|
||||
f(*fusion::advance_c<2>(it));
|
||||
}
|
||||
@ -90,11 +90,11 @@ namespace boost { namespace fusion { namespace detail
|
||||
struct unrolled_all<2>
|
||||
{
|
||||
template <typename It, typename F>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static bool call(It const& it, F f)
|
||||
{
|
||||
return
|
||||
f(*it) &&
|
||||
return
|
||||
f(*it) &&
|
||||
f(*fusion::advance_c<1>(it));
|
||||
}
|
||||
};
|
||||
@ -103,7 +103,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
struct unrolled_all<1>
|
||||
{
|
||||
template <typename It, typename F>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static bool call(It const& it, F f)
|
||||
{
|
||||
return f(*it);
|
||||
@ -114,7 +114,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
struct unrolled_all<0>
|
||||
{
|
||||
template <typename It, typename F>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static bool call(It const& /*it*/, F /*f*/)
|
||||
{
|
||||
return true;
|
||||
@ -122,7 +122,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
};
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline bool
|
||||
all(Sequence const& seq, F f, random_access_traversal_tag)
|
||||
{
|
||||
|
Reference in New Issue
Block a user