]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/include/boost/fusion/view/transform_view/detail/end_impl.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / fusion / include / boost / fusion / view / transform_view / detail / end_impl.hpp
1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3
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_END_IMPL_07162005_1028)
8 #define FUSION_END_IMPL_07162005_1028
9
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/view/transform_view/transform_view_fwd.hpp>
12
13 namespace boost { namespace fusion
14 {
15 template <typename First, typename F>
16 struct transform_view_iterator;
17
18 template <typename First1, typename First2, typename F>
19 struct transform_view_iterator2;
20
21 namespace extension
22 {
23 template <typename Tag>
24 struct end_impl;
25
26 // Unary Version
27 template <>
28 struct end_impl<transform_view_tag>
29 {
30 template <typename Sequence>
31 struct apply
32 {
33 typedef typename Sequence::last_type last_type;
34 typedef typename Sequence::transform_type transform_type;
35 typedef transform_view_iterator<last_type, transform_type> type;
36
37 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
38 static type
39 call(Sequence& s)
40 {
41 return type(s.last(), s.f);
42 }
43 };
44 };
45
46 // Binary Version
47 template <>
48 struct end_impl<transform_view2_tag>
49 {
50 template <typename Sequence>
51 struct apply
52 {
53 typedef typename Sequence::last1_type last1_type;
54 typedef typename Sequence::last2_type last2_type;
55 typedef typename Sequence::transform_type transform_type;
56 typedef transform_view_iterator2<last1_type, last2_type, transform_type> type;
57
58 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
59 static type
60 call(Sequence& s)
61 {
62 return type(s.last1(), s.last2(), s.f);
63 }
64 };
65 };
66 }
67 }}
68
69 #endif
70
71