Parent Directory
|
Revision Log
renaming "class" to "container"
1 /*============================================================================= 2 Copyright (c) 2005 Joel de Guzman 3 4 Use, modification and distribution is subject to the Boost Software 5 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 http://www.boost.org/LICENSE_1_0.txt) 7 ==============================================================================*/ 8 #if !defined(FUSION_LIST_TO_CONS_07172005_1041) 9 #define FUSION_LIST_TO_CONS_07172005_1041 10 11 #include <boost/fusion/sequence/container/list/cons.hpp> 12 #include <boost/fusion/sequence/container/list/limits.hpp> 13 #include <boost/preprocessor/repetition/enum.hpp> 14 #include <boost/preprocessor/repetition/enum_params.hpp> 15 #include <boost/preprocessor/repetition/enum_shifted_params.hpp> 16 #include <boost/preprocessor/arithmetic/dec.hpp> 17 18 #define FUSION_VOID(z, n, _) void_ 19 20 namespace boost { namespace fusion 21 { 22 struct nil; 23 struct void_; 24 }} 25 26 namespace boost { namespace fusion { namespace detail 27 { 28 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)> 29 struct list_to_cons 30 { 31 typedef T0 head_type; 32 typedef list_to_cons< 33 BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_LIST_SIZE, T), void_> 34 tail_list_to_cons; 35 typedef typename tail_list_to_cons::type tail_type; 36 37 typedef cons<head_type, tail_type> type; 38 39 #include <boost/fusion/sequence/container/list/detail/list_to_cons_call.hpp> 40 }; 41 42 template <> 43 struct list_to_cons<BOOST_PP_ENUM(FUSION_MAX_LIST_SIZE, FUSION_VOID, _)> 44 { 45 typedef nil type; 46 }; 47 }}} 48 49 #undef FUSION_VOID 50 #endif