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

@@ -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)
{

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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*/)
{

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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)
{