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_1215)
8 #define FUSION_CONVERT_09232005_1215
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/container/list/cons.hpp>
12 #include <boost/fusion/container/list/detail/build_cons.hpp>
13 #include <boost/fusion/container/list/detail/convert_impl.hpp>
14 #include <boost/fusion/sequence/intrinsic/empty.hpp>
15 #include <boost/fusion/sequence/intrinsic/begin.hpp>
16 #include <boost/fusion/sequence/intrinsic/end.hpp>
18 namespace boost { namespace fusion
22 template <typename Sequence>
27 typename result_of::begin<Sequence>::type
28 , typename result_of::end<Sequence>::type
32 typedef typename build_cons::type type;
34 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
38 return build_cons::call(fusion::begin(seq), fusion::end(seq));
43 template <typename Sequence>
44 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
45 inline typename result_of::as_list<Sequence>::type
46 as_list(Sequence& seq)
48 return result_of::as_list<Sequence>::call(seq);
51 template <typename Sequence>
52 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
53 inline typename result_of::as_list<Sequence const>::type
54 as_list(Sequence const& seq)
56 return result_of::as_list<Sequence const>::call(seq);