// Boost.Assign library extension // // Copyright Markus Werle 2008. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/assign/ // #ifndef BOOST_ASSIGN_TR1_LIST_OF_HPP #define BOOST_ASSIGN_TR1_LIST_OF_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #ifndef BOOST_ASSIGN_MAX_PARAMS // use user's value #define BOOST_ASSIGN_MAX_PARAMS 5 #endif #define BOOST_ASSIGN_MAX_PARAMETERS (BOOST_ASSIGN_MAX_PARAMS - 1) #define BOOST_ASSIGN_PARAMS1(n) BOOST_PP_ENUM_PARAMS(n, class U) #define BOOST_ASSIGN_PARAMS2(n) BOOST_PP_ENUM_BINARY_PARAMS(n, U, const& u) #define BOOST_ASSIGN_PARAMS3(n) BOOST_PP_ENUM_PARAMS(n, u) #define BOOST_ASSIGN_PARAMS4(n) BOOST_PP_ENUM_PARAMS(n, U) #define BOOST_ASSIGN_PARAMS2_NO_REF(n) BOOST_PP_ENUM_BINARY_PARAMS(n, U, u) namespace boost { namespace assign { #define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS) #define BOOST_PP_LOCAL_MACRO(n) \ template< class U, BOOST_ASSIGN_PARAMS1(n) > \ inline assign_detail::generic_list< std::tr1::tuple > \ tr1_tuple_list_of(U u, BOOST_ASSIGN_PARAMS2_NO_REF(n) ) \ { \ return assign_detail::generic_list< std::tr1::tuple >()( std::tr1::tuple( u, BOOST_ASSIGN_PARAMS3(n) )); \ } \ /**/ #include BOOST_PP_LOCAL_ITERATE() } // namespace 'assign' } // namespace 'boost' #undef BOOST_ASSIGN_PARAMS1 #undef BOOST_ASSIGN_PARAMS2 #undef BOOST_ASSIGN_PARAMS3 #undef BOOST_ASSIGN_PARAMS4 #undef BOOST_ASSIGN_PARAMS2_NO_REF #undef BOOST_ASSIGN_MAX_PARAMETERS #endif