Chris@16: /*============================================================================= Chris@16: Copyright (c) 2005-2013 Joel de Guzman Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: #if !defined(BOOST_FUSION_BUILD_MAP_02042013_1448) Chris@16: #define BOOST_FUSION_BUILD_MAP_02042013_1448 Chris@16: Chris@101: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { namespace fusion { namespace detail Chris@16: { Chris@101: template ::value Chris@101: > Chris@16: struct build_map; Chris@16: Chris@101: template Chris@101: struct build_map Chris@16: { Chris@16: typedef map<> type; Chris@101: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED Chris@16: static type Chris@16: call(First const&, Last const&) Chris@16: { Chris@16: return type(); Chris@16: } Chris@16: }; Chris@16: Chris@16: template Chris@16: struct push_front_map; Chris@16: Chris@16: template Chris@16: struct push_front_map> Chris@16: { Chris@16: typedef map type; Chris@16: Chris@101: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED Chris@16: static type Chris@16: call(T const& first, map const& rest) Chris@16: { Chris@16: return type(push_front(rest, first)); Chris@16: } Chris@16: }; Chris@16: Chris@101: template Chris@101: struct build_map Chris@16: { Chris@16: typedef Chris@101: build_map::type, Last, is_assoc> Chris@16: next_build_map; Chris@16: Chris@16: typedef push_front_map< Chris@101: typename pair_from::type Chris@16: , typename next_build_map::type> Chris@16: push_front; Chris@16: Chris@16: typedef typename push_front::type type; Chris@16: Chris@101: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED Chris@16: static type Chris@16: call(First const& f, Last const& l) Chris@16: { Chris@16: return push_front::call( Chris@101: pair_from::call(f) Chris@101: , next_build_map::call(fusion::next(f), l)); Chris@16: } Chris@16: }; Chris@16: }}} Chris@16: Chris@16: #endif