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

@ -49,31 +49,31 @@ namespace boost { namespace fusion
typedef Car car_type;
typedef Cdr cdr_type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
cons()
: car(), cdr() {}
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
explicit cons(typename detail::call_param<Car>::type in_car)
: car(in_car), cdr() {}
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
cons(
typename detail::call_param<Car>::type in_car
, typename detail::call_param<Cdr>::type in_cdr)
: car(in_car), cdr(in_cdr) {}
template <typename Car2, typename Cdr2>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
cons(cons<Car2, Cdr2> const& rhs)
: car(rhs.car), cdr(rhs.cdr) {}
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
cons(cons const& rhs)
: car(rhs.car), cdr(rhs.cdr) {}
template <typename Sequence>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
cons(
Sequence const& seq
, typename boost::enable_if<
@ -86,13 +86,13 @@ namespace boost { namespace fusion
, cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}
template <typename Iterator>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
cons(Iterator const& iter, mpl::true_ /*this_is_an_iterator*/)
: car(*iter)
, cdr(fusion::next(iter), mpl::true_()) {}
template <typename Car2, typename Cdr2>
BOOST_FUSION_GPU_ENABLED
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
cons& operator=(cons<Car2, Cdr2> const& rhs)
{
car = rhs.car;
@ -100,7 +100,7 @@ namespace boost { namespace fusion
return *this;
}
BOOST_FUSION_GPU_ENABLED
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
cons& operator=(cons const& rhs)
{
car = rhs.car;
@ -109,7 +109,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
BOOST_FUSION_GPU_ENABLED
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename boost::enable_if<
mpl::and_<
traits::is_sequence<Sequence>
@ -124,7 +124,7 @@ namespace boost { namespace fusion
}
template <typename Iterator>
BOOST_FUSION_GPU_ENABLED
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
void assign_from_iter(Iterator const& iter)
{
car = *iter;