File indexing completed on 2025-01-18 09:33:39
0001
0002
0003
0004
0005
0006
0007 #if !defined(FUSION_CONVERT_09232005_1340)
0008 #define FUSION_CONVERT_09232005_1340
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/container/map/detail/cpp03/as_map.hpp>
0012 #include <boost/fusion/container/map/detail/cpp03/convert_impl.hpp>
0013 #include <boost/fusion/container/map/detail/cpp03/map.hpp>
0014 #include <boost/fusion/sequence/intrinsic/begin.hpp>
0015 #include <boost/fusion/sequence/intrinsic/size.hpp>
0016
0017 namespace boost { namespace fusion
0018 {
0019 namespace result_of
0020 {
0021 template <typename Sequence>
0022 struct as_map
0023 {
0024 typedef typename
0025 detail::as_map<
0026 result_of::size<Sequence>::value
0027 , is_base_of<
0028 associative_tag
0029 , typename traits::category_of<Sequence>::type>::value
0030 >
0031 gen;
0032 typedef typename gen::
0033 template apply<typename result_of::begin<Sequence>::type>::type
0034 type;
0035 };
0036 }
0037
0038 template <typename Sequence>
0039 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0040 inline typename result_of::as_map<Sequence>::type
0041 as_map(Sequence& seq)
0042 {
0043 typedef typename result_of::as_map<Sequence>::gen gen;
0044 return gen::call(fusion::begin(seq));
0045 }
0046
0047 template <typename Sequence>
0048 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0049 inline typename result_of::as_map<Sequence const>::type
0050 as_map(Sequence const& seq)
0051 {
0052 typedef typename result_of::as_map<Sequence const>::gen gen;
0053 return gen::call(fusion::begin(seq));
0054 }
0055 }}
0056
0057 #endif