fix doc example typo
[boost.git] / boost / fusion / container / list / detail / list_to_cons.hpp
blob8e6d6912bed4edc2e516d425b6cdfbb7da266f8c
1 /*=============================================================================
2 Copyright (c) 2005 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_LIST_TO_CONS_07172005_1041)
8 #define FUSION_LIST_TO_CONS_07172005_1041
10 #include <boost/fusion/container/list/cons.hpp>
11 #include <boost/fusion/container/list/limits.hpp>
12 #include <boost/preprocessor/repetition/enum.hpp>
13 #include <boost/preprocessor/repetition/enum_params.hpp>
14 #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
15 #include <boost/preprocessor/arithmetic/dec.hpp>
17 #define FUSION_VOID(z, n, _) void_
19 namespace boost { namespace fusion
21 struct nil;
22 struct void_;
25 namespace boost { namespace fusion { namespace detail
27 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)>
28 struct list_to_cons
30 typedef T0 head_type;
31 typedef list_to_cons<
32 BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_LIST_SIZE, T), void_>
33 tail_list_to_cons;
34 typedef typename tail_list_to_cons::type tail_type;
36 typedef cons<head_type, tail_type> type;
38 #include <boost/fusion/container/list/detail/list_to_cons_call.hpp>
41 template <>
42 struct list_to_cons<BOOST_PP_ENUM(FUSION_MAX_LIST_SIZE, FUSION_VOID, _)>
44 typedef nil type;
45 };
46 }}}
48 #undef FUSION_VOID
49 #endif