2007-10-21 00:52:09 +00:00
|
|
|
/*=============================================================================
|
2013-02-04 03:49:34 +00:00
|
|
|
Copyright (c) 2001-2013 Joel de Guzman
|
2007-10-21 00:52:09 +00:00
|
|
|
|
2011-09-17 05:52:59 +00:00
|
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
2007-10-21 00:52:09 +00:00
|
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
==============================================================================*/
|
2013-02-04 03:49:34 +00:00
|
|
|
#if !defined(FUSION_MAP_TIE_07222005_1247)
|
|
|
|
#define FUSION_MAP_TIE_07222005_1247
|
2007-10-21 00:52:09 +00:00
|
|
|
|
2014-01-09 17:58:06 -08:00
|
|
|
#include <boost/fusion/support/config.hpp>
|
2007-10-21 00:52:09 +00:00
|
|
|
#include <boost/fusion/container/map/map.hpp>
|
|
|
|
|
2013-02-04 03:49:34 +00:00
|
|
|
#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP)
|
|
|
|
# include <boost/fusion/container/generation/detail/pp_map_tie.hpp>
|
2011-09-17 05:52:59 +00:00
|
|
|
#else
|
|
|
|
|
2013-02-04 03:49:34 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// C++11 variadic interface
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include <boost/fusion/support/pair.hpp>
|
2011-09-17 05:52:59 +00:00
|
|
|
|
2007-10-21 00:52:09 +00:00
|
|
|
namespace boost { namespace fusion
|
|
|
|
{
|
|
|
|
namespace result_of
|
|
|
|
{
|
2013-02-04 03:49:34 +00:00
|
|
|
template <typename ...Key>
|
|
|
|
struct map_tie
|
2007-10-21 00:52:09 +00:00
|
|
|
{
|
2013-02-04 03:49:34 +00:00
|
|
|
template <typename ...T>
|
|
|
|
struct apply
|
|
|
|
{
|
|
|
|
typedef map<fusion::pair<Key, T&>...> type;
|
|
|
|
};
|
2007-10-21 00:52:09 +00:00
|
|
|
};
|
|
|
|
}
|
2011-09-17 05:52:59 +00:00
|
|
|
|
2013-02-04 03:49:34 +00:00
|
|
|
template <typename ...Key, typename ...T>
|
2015-03-03 02:21:02 +09:00
|
|
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
2013-02-04 03:49:34 +00:00
|
|
|
inline map<fusion::pair<Key, T&>...>
|
|
|
|
map_tie(T&... arg)
|
2007-10-21 00:52:09 +00:00
|
|
|
{
|
2013-02-04 03:49:34 +00:00
|
|
|
typedef map<fusion::pair<Key, T&>...> result_type;
|
|
|
|
return result_type(arg...);
|
2007-10-21 00:52:09 +00:00
|
|
|
}
|
2013-02-04 03:49:34 +00:00
|
|
|
}}
|
2007-10-21 00:52:09 +00:00
|
|
|
|
2011-09-17 05:52:59 +00:00
|
|
|
#endif
|
2014-01-21 14:17:09 -08:00
|
|
|
#endif
|