fix doc example typo
[boost.git] / boost / fusion / container / list / convert.hpp
blob418158cfaab7bbc61992f1cf6f1cf64e1989a4be
1 /*=============================================================================
2 Copyright (c) 2001-2006 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/container/list/cons.hpp>
11 #include <boost/fusion/container/list/detail/build_cons.hpp>
12 #include <boost/fusion/container/list/detail/convert_impl.hpp>
13 #include <boost/fusion/sequence/intrinsic/empty.hpp>
14 #include <boost/fusion/sequence/intrinsic/begin.hpp>
15 #include <boost/fusion/sequence/intrinsic/end.hpp>
17 namespace boost { namespace fusion
19 namespace result_of
21 template <typename Sequence>
22 struct as_list
24 typedef typename
25 detail::build_cons<
26 typename result_of::begin<Sequence>::type
27 , typename result_of::end<Sequence>::type
29 build_cons;
31 typedef typename build_cons::type type;
33 static type
34 call(Sequence& seq)
36 return build_cons::call(fusion::begin(seq), fusion::end(seq));
41 template <typename Sequence>
42 inline typename result_of::as_list<Sequence>::type
43 as_list(Sequence& seq)
45 return result_of::as_list<Sequence>::call(seq);
48 template <typename Sequence>
49 inline typename result_of::as_list<Sequence const>::type
50 as_list(Sequence const& seq)
52 return result_of::as_list<Sequence const>::call(seq);
56 #endif