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:
@@ -12,7 +12,7 @@
|
||||
#include <boost/mpl/advance.hpp>
|
||||
#include <boost/fusion/iterator/advance.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_iterator_tag;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<sequence_type,
|
||||
typename mpl::advance<iterator_type, Dist>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_tag;
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace boost { namespace fusion
|
||||
typedef typename result_of::at<index_type, N>::type index;
|
||||
typedef typename result_of::at<sequence_type, index>::type type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Sequence& seq)
|
||||
{
|
||||
return fusion::at<index>(seq.seq);
|
||||
|
@@ -35,7 +35,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<Sequence,
|
||||
typename mpl::begin<index_type>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Sequence& s)
|
||||
{
|
||||
return type(s);
|
||||
|
@@ -34,7 +34,7 @@ namespace boost { namespace fusion
|
||||
typedef typename result_of::at<
|
||||
typename sequence_type::sequence_type, index>::type type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Iterator const& i)
|
||||
{
|
||||
return at<index>(i.seq.seq);
|
||||
|
@@ -31,7 +31,7 @@ namespace boost { namespace fusion
|
||||
typename First::first_type, typename Last::first_type
|
||||
>::type type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(First const& /*first*/, Last const& /*last*/)
|
||||
{
|
||||
|
@@ -36,7 +36,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<Sequence,
|
||||
typename mpl::end<index_type>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Sequence& s)
|
||||
{
|
||||
return type(s);
|
||||
|
@@ -35,7 +35,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<sequence_type,
|
||||
typename mpl::next<first_type>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
|
@@ -63,7 +63,7 @@ namespace boost { namespace fusion { namespace result_of
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
template<BOOST_PP_ENUM_PARAMS(N, int I), typename Sequence>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline nview<Sequence, mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> >
|
||||
as_nview(Sequence& s)
|
||||
{
|
||||
|
@@ -35,7 +35,7 @@ namespace boost { namespace fusion
|
||||
typedef nview_iterator<sequence_type,
|
||||
typename mpl::prior<first_type>::type> type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
|
@@ -40,7 +40,7 @@ namespace boost { namespace fusion
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <typename T>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename add_reference<T>::type
|
||||
operator()(T& x) const
|
||||
{
|
||||
@@ -48,7 +48,7 @@ namespace boost { namespace fusion
|
||||
}
|
||||
#else
|
||||
template <typename T>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename result<addref(T)>::type
|
||||
operator()(T&& x) const
|
||||
{
|
||||
@@ -68,7 +68,7 @@ namespace boost { namespace fusion
|
||||
{};
|
||||
|
||||
template <typename T>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename add_reference<typename add_const<T>::type>::type
|
||||
operator()(T& x) const
|
||||
{
|
||||
@@ -76,7 +76,7 @@ namespace boost { namespace fusion
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename add_reference<typename add_const<T>::type>::type
|
||||
operator()(T const& x) const
|
||||
{
|
||||
@@ -108,7 +108,8 @@ namespace boost { namespace fusion
|
||||
typedef typename result_of::as_vector<transform_view_type>::type
|
||||
sequence_type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED explicit nview(Sequence& val)
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit nview(Sequence& val)
|
||||
: seq(sequence_type(transform_view_type(val, transform_type())))
|
||||
{}
|
||||
|
||||
|
@@ -42,7 +42,8 @@ namespace boost { namespace fusion
|
||||
typedef Sequence sequence_type;
|
||||
typedef mpl_iterator<Pos> first_type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED explicit nview_iterator(Sequence& in_seq)
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit nview_iterator(Sequence& in_seq)
|
||||
: seq(in_seq) {}
|
||||
|
||||
Sequence& seq;
|
||||
|
Reference in New Issue
Block a user