]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/include/boost/fusion/view/transform_view/detail/value_of_impl.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / fusion / include / boost / fusion / view / transform_view / detail / value_of_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_VALUE_OF_IMPL_07162005_1030)
8 #define FUSION_VALUE_OF_IMPL_07162005_1030
9
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/mpl/apply.hpp>
12 #include <boost/fusion/iterator/value_of.hpp>
13 #include <boost/fusion/view/transform_view/detail/apply_transform_result.hpp>
14
15 namespace boost { namespace fusion
16 {
17 struct transform_view_iterator_tag;
18 struct transform_view_iterator2_tag;
19
20 namespace extension
21 {
22 template <typename Tag>
23 struct value_of_impl;
24
25 // Unary Version
26 template <>
27 struct value_of_impl<transform_view_iterator_tag>
28 {
29 template <typename Iterator>
30 struct apply
31 {
32 typedef typename
33 result_of::value_of<typename Iterator::first_type>::type
34 value_type;
35
36 typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
37 typedef typename mpl::apply<transform_type, value_type>::type type;
38 };
39 };
40
41 // Binary Version
42 template <>
43 struct value_of_impl<transform_view_iterator2_tag>
44 {
45 template <typename Iterator>
46 struct apply
47 {
48 typedef typename
49 result_of::value_of<typename Iterator::first1_type>::type
50 value1_type;
51 typedef typename
52 result_of::value_of<typename Iterator::first2_type>::type
53 value2_type;
54
55 typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
56 typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type;
57 };
58 };
59 }
60 }}
61
62 #endif
63
64