File indexing completed on 2025-01-18 09:31:17
0001
0002
0003
0004
0005
0006
0007 #if !defined(FUSION_TRANSFORM_07052005_1057)
0008 #define FUSION_TRANSFORM_07052005_1057
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/view/transform_view/transform_view.hpp>
0012
0013 namespace boost { namespace fusion
0014 {
0015 struct void_;
0016
0017 namespace result_of
0018 {
0019 template <typename Sequence1, typename Sequence2, typename F = void_>
0020 struct transform
0021 {
0022 typedef transform_view<Sequence1, Sequence2, F> type;
0023 };
0024
0025 template <typename Sequence, typename F>
0026 #if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
0027 struct transform<Sequence, F, void_>
0028 #else
0029 struct transform<Sequence, F>
0030 #endif
0031 {
0032 typedef transform_view<Sequence, F> type;
0033 };
0034 }
0035
0036 template <typename Sequence, typename F>
0037 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0038 inline typename result_of::transform<Sequence const, F>::type
0039 transform(Sequence const& seq, F f)
0040 {
0041 return transform_view<Sequence const, F>(seq, f);
0042 }
0043
0044 template <typename Sequence1, typename Sequence2, typename F>
0045 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0046 inline typename result_of::transform<Sequence1 const, Sequence2 const, F>::type
0047 transform(Sequence1 const& seq1, Sequence2 const& seq2, F f)
0048 {
0049 return transform_view<Sequence1 const, Sequence2 const, F>(seq1, seq2, f);
0050 }
0051 }}
0052
0053 #endif
0054