1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #if !defined(FUSION_TRANSFORM_07052005_1057)
8 #define FUSION_TRANSFORM_07052005_1057
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/view/transform_view/transform_view.hpp>
13 namespace boost { namespace fusion
19 template <typename Sequence1, typename Sequence2, typename F = void_>
22 typedef transform_view<Sequence1, Sequence2, F> type;
25 template <typename Sequence, typename F>
26 #if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
27 struct transform<Sequence, F, void_>
29 struct transform<Sequence, F>
32 typedef transform_view<Sequence, F> type;
36 template <typename Sequence, typename F>
37 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
38 inline typename result_of::transform<Sequence const, F>::type
39 transform(Sequence const& seq, F f)
41 return transform_view<Sequence const, F>(seq, f);
44 template <typename Sequence1, typename Sequence2, typename F>
45 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
46 inline typename result_of::transform<Sequence1 const, Sequence2 const, F>::type
47 transform(Sequence1 const& seq1, Sequence2 const& seq2, F f)
49 return transform_view<Sequence1 const, Sequence2 const, F>(seq1, seq2, f);