Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:33:39

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2005-2006 Dan Marsden
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #if !defined(FUSION_CONVERT_IMPL_09232005_1340)
0009 #define FUSION_CONVERT_IMPL_09232005_1340
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/container/map/detail/cpp03/as_map.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     struct map_tag;
0020 
0021     namespace extension
0022     {
0023         template <typename T>
0024         struct convert_impl;
0025 
0026         template <>
0027         struct convert_impl<map_tag>
0028         {
0029             template <typename Sequence>
0030             struct apply
0031             {
0032                 typedef typename
0033                     detail::as_map<
0034                         result_of::size<Sequence>::value
0035                       , is_base_of<
0036                             associative_tag
0037                           , typename traits::category_of<Sequence>::type>::value
0038                     >
0039                 gen;
0040                 typedef typename gen::
0041                     template apply<typename result_of::begin<Sequence>::type>::type
0042                 type;
0043 
0044                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0045                 static type call(Sequence& seq)
0046                 {
0047                     return gen::call(fusion::begin(seq));
0048                 }
0049             };
0050         };
0051     }
0052 }}
0053 
0054 #endif