forked from boostorg/fusion
Revert "Remove unnecessary overloads, state should always be const."
This reverts commit 9b77c26a24
.
As discussed on github, the original code was wrong.
This commit is contained in:
@ -194,6 +194,30 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
return detail::BOOST_FUSION_FOLD_NAME<Seq const, State const, F>(seq, state, f);
|
return detail::BOOST_FUSION_FOLD_NAME<Seq const, State const, F>(seq, state, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||||
|
Seq
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
BOOST_FUSION_FOLD_NAME(Seq& seq, State& state, F f)
|
||||||
|
{
|
||||||
|
return detail::BOOST_FUSION_FOLD_NAME<Seq, State, F>(seq, state, f);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||||
|
Seq const
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
BOOST_FUSION_FOLD_NAME(Seq const& seq, State& state, F f)
|
||||||
|
{
|
||||||
|
return detail::BOOST_FUSION_FOLD_NAME<Seq const, State, F>(seq, state, f);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#undef BOOST_FUSION_FOLD_NAME
|
#undef BOOST_FUSION_FOLD_NAME
|
||||||
|
@ -33,6 +33,24 @@ namespace boost { namespace fusion
|
|||||||
, F
|
, F
|
||||||
>::type
|
>::type
|
||||||
fold(Seq const& seq, State const& state, F f);
|
fold(Seq const& seq, State const& state, F f);
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::fold<
|
||||||
|
Seq
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
fold(Seq& seq, State& state, F f);
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::fold<
|
||||||
|
Seq const
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
fold(Seq const& seq, State& state, F f);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,6 +33,24 @@ namespace boost { namespace fusion
|
|||||||
, F
|
, F
|
||||||
>::type
|
>::type
|
||||||
iter_fold(Seq const& seq, State const& state, F f);
|
iter_fold(Seq const& seq, State const& state, F f);
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::iter_fold<
|
||||||
|
Seq
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
iter_fold(Seq& seq, State& state, F f);
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::iter_fold<
|
||||||
|
Seq const
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
iter_fold(Seq const& seq, State& state, F f);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,6 +33,24 @@ namespace boost { namespace fusion
|
|||||||
, F
|
, F
|
||||||
>::type
|
>::type
|
||||||
reverse_fold(Seq const& seq, State const& state, F f);
|
reverse_fold(Seq const& seq, State const& state, F f);
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::reverse_fold<
|
||||||
|
Seq
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
reverse_fold(Seq& seq, State& state, F f);
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::reverse_fold<
|
||||||
|
Seq const
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
reverse_fold(Seq const& seq, State& state, F f);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,6 +33,24 @@ namespace boost { namespace fusion
|
|||||||
, F
|
, F
|
||||||
>::type
|
>::type
|
||||||
reverse_iter_fold(Seq const& seq, State const& state, F f);
|
reverse_iter_fold(Seq const& seq, State const& state, F f);
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::reverse_iter_fold<
|
||||||
|
Seq
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
reverse_iter_fold(Seq& seq, State& state, F f);
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline typename result_of::reverse_iter_fold<
|
||||||
|
Seq const
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
reverse_iter_fold(Seq const& seq, State& state, F f);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user