Fix to meet constexpr requirements

This commit is contained in:
Kohei Takahashi
2014-10-26 18:20:45 +09:00
parent 20ee8d192a
commit a7e9bb2df4
2 changed files with 10 additions and 3 deletions

View File

@ -132,7 +132,7 @@ namespace boost { namespace fusion
{} {}
template<typename OtherSeq> template<typename OtherSeq>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
basic_iterator& basic_iterator&
operator=(basic_iterator<Tag,Category,OtherSeq,Index> const& it) operator=(basic_iterator<Tag,Category,OtherSeq,Index> const& it)
{ {

View File

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