1 /*============================================================================= 2 Copyright (c) 2001-2013 Joel de Guzman 3 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_MAP_TIE_07222005_1247) 8 #define FUSION_MAP_TIE_07222005_1247 9 10 #include <boost/fusion/support/config.hpp> 11 #include <boost/fusion/container/map/map.hpp> 12 13 #if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) 14 # include <boost/fusion/container/generation/detail/pp_map_tie.hpp> 15 #else 16 17 /////////////////////////////////////////////////////////////////////////////// 18 // C++11 variadic interface 19 /////////////////////////////////////////////////////////////////////////////// 20 #include <boost/fusion/support/pair.hpp> 21 22 namespace boost { namespace fusion 23 { 24 namespace result_of 25 { 26 template <typename ...Key> 27 struct map_tie 28 { 29 template <typename ...T> 30 struct apply 31 { 32 typedef map<fusion::pair<Key, T&>...> type; 33 }; 34 }; 35 } 36 37 template <typename ...Key, typename ...T> 38 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED 39 inline map<fusion::pair<Key, T&>...> map_tie(T &...arg)40 map_tie(T&... arg) 41 { 42 typedef map<fusion::pair<Key, T&>...> result_type; 43 return result_type(arg...); 44 } 45 }} 46 47 #endif 48 #endif 49