mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-25 18:17:29 +02:00
Implement C++11 list_tie.
This commit is contained in:
@ -53,7 +53,7 @@ namespace boost { namespace fusion
|
|||||||
// $$$ shouldn't we remove_reference first to allow references? $$$
|
// $$$ shouldn't we remove_reference first to allow references? $$$
|
||||||
#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
|
#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
|
||||||
|
|
||||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/list_tie.hpp>
|
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_list_tie.hpp>
|
||||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE)
|
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE)
|
||||||
#include BOOST_PP_ITERATE()
|
#include BOOST_PP_ITERATE()
|
||||||
|
|
||||||
|
@ -10,7 +10,35 @@
|
|||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
#include <boost/fusion/container/list/list.hpp>
|
#include <boost/fusion/container/list/list.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST)
|
||||||
# include <boost/fusion/container/generation/detail/pp_list_tie.hpp>
|
# include <boost/fusion/container/generation/detail/pp_list_tie.hpp>
|
||||||
|
#else
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++11 variadic interface
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
namespace boost { namespace fusion
|
||||||
|
{
|
||||||
|
namespace result_of
|
||||||
|
{
|
||||||
|
template <typename ...T>
|
||||||
|
struct list_tie
|
||||||
|
{
|
||||||
|
typedef list<T&...> type;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename ...T>
|
||||||
|
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||||
|
inline list<T&...>
|
||||||
|
list_tie(T&... arg)
|
||||||
|
{
|
||||||
|
return list<T&...>(arg...);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user