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 committed 2015-03-03 02:21:02 +09:00
1 parent d7c918e36f
commit 2114bfca6c
280 files changed
+1107 -935

No files matched your search

@@ -34,7 +34,7 @@ namespace boost { namespace fusion {
};
template<typename It>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<poly_advance(It)>::type
operator()(const It& it) const
{
@@ -57,7 +57,7 @@ namespace boost { namespace fusion {
typedef zip_view_iterator<
typename result_of::transform<typename It::iterators, detail::poly_advance<N> >::type> type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(It const& it)
{
@@ -44,7 +44,7 @@ namespace boost { namespace fusion
};
template<typename Seq>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<poly_at(Seq&)>::type
operator()(Seq& seq) const
{
@@ -52,14 +52,14 @@ namespace boost { namespace fusion
}
template<typename Seq>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<poly_at(Seq const&)>::type
operator()(Seq const& seq) const
{
return fusion::at<N>(seq);
}
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type operator()(unused_type const&) const
{
return unused_type();
@@ -82,7 +82,7 @@ namespace boost { namespace fusion
typename result_of::transform<
typename Seq::sequences, detail::poly_at<N> >::type>::type type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Seq& seq)
{
@@ -41,7 +41,7 @@ namespace boost { namespace fusion {
};
template<typename Seq>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<poly_begin(Seq&)>::type
operator()(Seq& seq) const
{
@@ -49,14 +49,14 @@ namespace boost { namespace fusion {
}
template<typename Seq>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<poly_begin(Seq const&)>::type
operator()(Seq const& seq) const
{
return fusion::begin(seq);
}
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type operator()(unused_type const&) const
{
return unused_type();
@@ -79,7 +79,7 @@ namespace boost { namespace fusion {
typename result_of::transform<typename Sequence::sequences, detail::poly_begin>::type,
typename Sequence::category> type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Sequence& sequence)
{
@@ -43,14 +43,14 @@ namespace boost { namespace fusion {
};
template<typename It>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<poly_deref(It)>::type
operator()(const It& it) const
{
return fusion::deref(it);
}
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type operator()(unused_type const&) const
{
return unused_type();
@@ -72,7 +72,7 @@ namespace boost { namespace fusion {
typedef typename result_of::as_vector<
typename result_of::transform<typename It::iterators, detail::poly_deref>::type>::type type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(It const& it)
{
@@ -70,7 +70,7 @@ namespace boost { namespace fusion {
struct apply
: detail::zip_view_iterator_distance<It1, It2>::type
{
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static typename detail::zip_view_iterator_distance<It1, It2>::type
call(It1 const& /*it1*/, It2 const& /*it2*/)
{
@@ -55,7 +55,7 @@ namespace boost { namespace fusion {
};
template<typename Seq>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<endpoints(Seq&)>::type
operator()(Seq& seq) const
{
@@ -63,14 +63,14 @@ namespace boost { namespace fusion {
}
template<typename Seq>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<endpoints(Seq const&)>::type
operator()(Seq const& seq) const
{
return fusion::advance<M>(fusion::begin(seq));
}
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type operator()(unused_type const&) const
{
return unused_type();
@@ -93,7 +93,7 @@ namespace boost { namespace fusion {
typename result_of::transform<typename Sequence::sequences, detail::endpoints<typename Sequence::size> >::type,
typename Sequence::category> type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Sequence& sequence)
{
@@ -42,14 +42,14 @@ namespace boost { namespace fusion {
};
template<typename It>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<poly_next(It)>::type
operator()(const It& it) const
{
return fusion::next(it);
}
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type operator()(unused_type const&) const
{
return unused_type();
@@ -72,7 +72,7 @@ namespace boost { namespace fusion {
typename result_of::transform<typename Iterator::iterators, detail::poly_next>::type,
typename Iterator::category> type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Iterator const& it)
{
@@ -41,14 +41,14 @@ namespace boost { namespace fusion {
};
template<typename It>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<poly_prior(It)>::type
operator()(const It& it) const
{
return fusion::prior(it);
}
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type operator()(unused_type const&) const
{
return unused_type();
@@ -71,7 +71,7 @@ namespace boost { namespace fusion {
typename result_of::transform<typename Iterator::iterators, detail::poly_prior>::type,
typename Iterator::category> type;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Iterator const& it)
@@ -122,7 +122,7 @@ namespace boost { namespace fusion {
typedef typename fusion::result_of::as_vector<Sequences>::type sequences;
typedef typename detail::min_size<real_sequences>::type size;
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
zip_view(
const Sequences& seqs)
: sequences_(seqs)
@@ -35,7 +35,7 @@ namespace boost { namespace fusion {
typedef Traversal category;
template<typename InitSeq>
BOOST_FUSION_GPU_ENABLED
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
zip_view_iterator(
const InitSeq& iterator_seq)
: iterators_(iterator_seq)