Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:34:40

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #if !defined(FUSION_CONVERT_09222005_1104)
0008 #define FUSION_CONVERT_09222005_1104
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/container/vector/detail/as_vector.hpp>
0012 #include <boost/fusion/container/vector/detail/convert_impl.hpp>
0013 #include <boost/fusion/container/vector/vector.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_vector
0023         {
0024             typedef typename detail::as_vector<result_of::size<Sequence>::value> gen;
0025             typedef typename gen::
0026                 template apply<typename result_of::begin<Sequence>::type>::type
0027             type;
0028         };
0029     }
0030 
0031     template <typename Sequence>
0032     BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0033     inline typename result_of::as_vector<Sequence>::type
0034     as_vector(Sequence& seq)
0035     {
0036         typedef typename result_of::as_vector<Sequence>::gen gen;
0037         return gen::call(fusion::begin(seq));
0038     }
0039 
0040     template <typename Sequence>
0041     BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0042     inline typename result_of::as_vector<Sequence const>::type
0043     as_vector(Sequence const& seq)
0044     {
0045         typedef typename result_of::as_vector<Sequence const>::gen gen;
0046         return gen::call(fusion::begin(seq));
0047     }
0048 }}
0049 
0050 #endif