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_CONVERT_09232005_1340)
8 #define FUSION_CONVERT_09232005_1340
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/container/map/detail/cpp03/as_map.hpp>
12 #include <boost/fusion/container/map/detail/cpp03/convert_impl.hpp>
13 #include <boost/fusion/container/map/detail/cpp03/map.hpp>
14 #include <boost/fusion/sequence/intrinsic/begin.hpp>
15 #include <boost/fusion/sequence/intrinsic/size.hpp>
17 namespace boost { namespace fusion
21 template <typename Sequence>
26 result_of::size<Sequence>::value
29 , typename traits::category_of<Sequence>::type>::value
32 typedef typename gen::
33 template apply<typename result_of::begin<Sequence>::type>::type
38 template <typename Sequence>
39 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
40 inline typename result_of::as_map<Sequence>::type
43 typedef typename result_of::as_map<Sequence>::gen gen;
44 return gen::call(fusion::begin(seq));
47 template <typename Sequence>
48 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
49 inline typename result_of::as_map<Sequence const>::type
50 as_map(Sequence const& seq)
52 typedef typename result_of::as_map<Sequence const>::gen gen;
53 return gen::call(fusion::begin(seq));