Back to home page

EIC code displayed by LXR

 
 

    


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

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_1215)
0009 #define FUSION_CONVERT_IMPL_09232005_1215
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/container/list/cons.hpp>
0013 #include <boost/fusion/container/list/detail/build_cons.hpp>
0014 #include <boost/fusion/sequence/intrinsic/empty.hpp>
0015 #include <boost/fusion/sequence/intrinsic/begin.hpp>
0016 #include <boost/fusion/sequence/intrinsic/end.hpp>
0017 
0018 namespace boost { namespace fusion
0019 {
0020     struct cons_tag;
0021 
0022     namespace extension
0023     {
0024         template <typename T>
0025         struct convert_impl;
0026 
0027         template <>
0028         struct convert_impl<cons_tag>
0029         {
0030             template <typename Sequence>
0031             struct apply
0032             {
0033                 typedef typename
0034                     detail::build_cons<
0035                         typename result_of::begin<Sequence>::type
0036                       , typename result_of::end<Sequence>::type
0037                     >
0038                 build_cons;
0039 
0040                 typedef typename build_cons::type type;
0041 
0042                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0043                 static type
0044                 call(Sequence& seq)
0045                 {
0046                     return build_cons::call(fusion::begin(seq), fusion::end(seq));
0047                 }
0048             };
0049         };
0050     }
0051 }}
0052 
0053 #endif