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:
Kohei Takahashi
2015-03-03 02:21:02 +09:00
parent d7c918e36f
commit 2114bfca6c
280 changed files with 1107 additions and 935 deletions

View File

@ -31,7 +31,7 @@ namespace boost { namespace fusion
typedef typename result_of::advance<begin_type,N>::type pos;
typedef typename result_of::deref<pos>::type type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Seq& s)
{

View File

@ -7,6 +7,8 @@
#if !defined(FUSION_BEGIN_IMPL_05062005_1226)
#define FUSION_BEGIN_IMPL_05062005_1226
#include <boost/fusion/support/config.hpp>
namespace boost { namespace fusion
{
struct iterator_range_tag;
@ -24,7 +26,7 @@ namespace boost { namespace fusion
{
typedef typename Sequence::begin_type type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Sequence& s)
{

View File

@ -7,6 +7,8 @@
#if !defined(FUSION_END_IMPL_05062005_1226)
#define FUSION_END_IMPL_05062005_1226
#include <boost/fusion/support/config.hpp>
namespace boost { namespace fusion
{
struct iterator_range_tag;
@ -24,7 +26,7 @@ namespace boost { namespace fusion
{
typedef typename Sequence::end_type type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Sequence& s)
{

View File

@ -48,7 +48,7 @@ namespace boost { namespace fusion
}
template <typename Sequence, typename T>
BOOST_FUSION_GPU_ENABLED
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_enable_if<
traits::is_sequence<Sequence>
@ -57,7 +57,7 @@ namespace boost { namespace fusion
push_back(Sequence const& seq, T const& x);
template <typename Sequence, typename T>
BOOST_FUSION_GPU_ENABLED
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_enable_if<
traits::is_sequence<Sequence>
@ -152,7 +152,7 @@ namespace boost { namespace fusion { namespace detail
>
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Stack const& stack)
{
//return segment_sequence(
@ -199,7 +199,7 @@ namespace boost { namespace fusion { namespace detail
>
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Stack const& stack)
{
// return iterator_range(begin(car(cdr(stack_begin))), end(front(car(stack_begin))));
@ -212,7 +212,7 @@ namespace boost { namespace fusion { namespace detail
{
typedef typename Stack::cdr_type type; // nil_
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Stack const &stack)
{
return stack.cdr;
@ -298,7 +298,7 @@ namespace boost { namespace fusion { namespace detail
>
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Stack const& stack)
{
// return segment_sequence(
@ -345,7 +345,7 @@ namespace boost { namespace fusion { namespace detail
>
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Stack const& stack)
{
// return iterator_range(begin(front(car(stack_end))), begin(car(cdr(stack_end))));
@ -358,7 +358,7 @@ namespace boost { namespace fusion { namespace detail
{
typedef typename Stack::cdr_type type; // nil_
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Stack const& stack)
{
return stack.cdr;
@ -437,7 +437,7 @@ namespace boost { namespace fusion { namespace detail
>
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(StackBegin stack_begin, StackEnd stack_end)
{
//return segment_sequence(
@ -471,7 +471,7 @@ namespace boost { namespace fusion { namespace detail
typename impl::type
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(StackBegin stack_begin, StackEnd stack_end)
{
return impl::call(stack_begin.cdr, stack_end.cdr);
@ -501,7 +501,7 @@ namespace boost { namespace fusion { namespace detail
segment_sequence<segment_type>
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(StackBegin stack_begin, StackEnd stack_end)
{
//return segment_sequence(
@ -531,7 +531,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename impl::type type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Begin const& begin, End const& end)
{
return impl::call(

View File

@ -41,7 +41,7 @@ namespace boost { namespace fusion
typename result_of::segments<typename impl::type>::type
type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence & seq)
{
return fusion::segments(impl::call(seq.first, seq.last));

View File

@ -44,7 +44,7 @@ namespace boost { namespace fusion
typedef typename traits::category_of<begin_type>::type category;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
iterator_range(First const& in_first, Last const& in_last)
: first(convert_iterator<First>::call(in_first))
, last(convert_iterator<Last>::call(in_last)) {}