Initial constexpr support

This allows to use, e.g., boost::fusion::fold within constexpr functions.

The BOOST_CONSTEXPR macro is used to declare functions constexpr.
This commit is contained in:
gnzlbg
2014-05-30 16:39:00 +02:00
parent 4f941d9760
commit c2abefbab8
39 changed files with 126 additions and 126 deletions

View File

@@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace detail
>
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq)
{
return type(

View File

@@ -38,7 +38,7 @@ namespace boost { namespace fusion { namespace detail
typedef cons<range_type, Context> type;
typedef mpl::false_ continue_type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const&, Context const& context, segmented_begin_fun)
{
return type(range_type(fusion::begin(seq), fusion::end(seq)), context);
@@ -64,7 +64,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename fold_impl::type type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, Stack const& stack)
{
return fold_impl::call(seq, end_impl::call(seq, stack), stack, segmented_begin_fun());
@@ -79,7 +79,7 @@ namespace boost { namespace fusion { namespace detail
typedef iterator_range<begin_type, end_type> pair_type;
typedef cons<pair_type, Stack> type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, Stack stack)
{
return type(pair_type(fusion::begin(seq), fusion::end(seq)), stack);

View File

@@ -28,7 +28,7 @@ namespace boost { namespace fusion { namespace detail
>
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence & seq)
{
return type(

View File

@@ -48,7 +48,7 @@ namespace boost { namespace fusion { namespace detail
typedef iterator_range<end_type, end_type> pair_type;
typedef cons<pair_type, Stack> type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence & seq, Stack stack)
{
end_type end = fusion::end(fusion::segments(seq));