comparison DEPENDENCIES/generic/include/boost/fusion/container/map/detail/cpp03/convert.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children c530137014c0
comparison
equal deleted inserted replaced
15:663ca0da4350 16:2665513ce2d3
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_CONVERT_09232005_1340)
8 #define FUSION_CONVERT_09232005_1340
9
10 #include <boost/fusion/container/map/detail/cpp03/as_map.hpp>
11 #include <boost/fusion/container/map/detail/cpp03/convert_impl.hpp>
12 #include <boost/fusion/container/map/detail/cpp03/map.hpp>
13 #include <boost/fusion/sequence/intrinsic/begin.hpp>
14 #include <boost/fusion/sequence/intrinsic/size.hpp>
15
16 namespace boost { namespace fusion
17 {
18 namespace result_of
19 {
20 template <typename Sequence>
21 struct as_map
22 {
23 typedef typename detail::as_map<result_of::size<Sequence>::value> gen;
24 typedef typename gen::
25 template apply<typename result_of::begin<Sequence>::type>::type
26 type;
27 };
28 }
29
30 template <typename Sequence>
31 inline typename result_of::as_map<Sequence>::type
32 as_map(Sequence& seq)
33 {
34 typedef typename result_of::as_map<Sequence>::gen gen;
35 return gen::call(fusion::begin(seq));
36 }
37
38 template <typename Sequence>
39 inline typename result_of::as_map<Sequence const>::type
40 as_map(Sequence const& seq)
41 {
42 typedef typename result_of::as_map<Sequence const>::gen gen;
43 return gen::call(fusion::begin(seq));
44 }
45 }}
46
47 #endif