Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:47:51

0001 /*=============================================================================
0002     Copyright (c) 2001-2013 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #if !defined(FUSION_MAKE_MAP_07222005_1247)
0008 #define FUSION_MAKE_MAP_07222005_1247
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/container/map/map.hpp>
0012 
0013 #if !defined(BOOST_FUSION_HAS_VARIADIC_MAP)
0014 # include <boost/fusion/container/generation/detail/pp_make_map.hpp>
0015 #else
0016 
0017 ///////////////////////////////////////////////////////////////////////////////
0018 // C++11 variadic interface
0019 ///////////////////////////////////////////////////////////////////////////////
0020 #include <boost/fusion/support/detail/as_fusion_element.hpp>
0021 #include <boost/fusion/support/pair.hpp>
0022 
0023 namespace boost { namespace fusion
0024 {
0025     namespace result_of
0026     {
0027         template <typename ...Key>
0028         struct make_map
0029         {
0030             template <typename ...T>
0031             struct apply
0032             {
0033                 typedef map<
0034                     fusion::pair<
0035                         Key
0036                       , typename detail::as_fusion_element<T>::type
0037                     >...>
0038                 type;
0039             };
0040         };
0041     }
0042 
0043     template <typename ...Key, typename ...T>
0044     BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0045     inline map<
0046         fusion::pair<
0047             Key
0048           , typename detail::as_fusion_element<T>::type
0049         >...>
0050     make_map(T const&... arg)
0051     {
0052         typedef map<
0053             fusion::pair<
0054                 Key
0055               , typename detail::as_fusion_element<T>::type
0056             >...>
0057         result_type;
0058 
0059         return result_type(arg...);
0060     }
0061  }}
0062 
0063 #endif
0064 #endif