fix doc example typo
[boost.git] / boost / fusion / container / map / convert.hpp
blobf174da58e9949a1dbb873f1f794d4fa2bc8f1326
1 /*=============================================================================
2 Copyright (c) 2001-2006 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_CONVERT_09232005_1340)
8 #define FUSION_CONVERT_09232005_1340
10 #include <boost/fusion/container/map/detail/as_map.hpp>
11 #include <boost/fusion/container/map/detail/convert_impl.hpp>
12 #include <boost/fusion/container/map/map.hpp>
13 #include <boost/fusion/sequence/intrinsic/begin.hpp>
14 #include <boost/fusion/sequence/intrinsic/size.hpp>
16 namespace boost { namespace fusion
18 namespace result_of
20 template <typename Sequence>
21 struct as_map
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;
30 template <typename Sequence>
31 inline typename result_of::as_map<Sequence>::type
32 as_map(Sequence& seq)
34 typedef typename result_of::as_map<Sequence>::gen gen;
35 return gen::call(fusion::begin(seq));
38 template <typename Sequence>
39 inline typename result_of::as_map<Sequence const>::type
40 as_map(Sequence const& seq)
42 typedef typename result_of::as_map<Sequence const>::gen gen;
43 return gen::call(fusion::begin(seq));
47 #endif