mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-29 12:07:36 +02:00
Added adapter for std::tuple (only for implementations using variadic templates)
[SVN r74788]
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_AT_05042005_0722)
|
||||
@ -21,6 +21,7 @@ namespace boost { namespace fusion
|
||||
struct boost_array_tag; // boost::array tag
|
||||
struct mpl_sequence_tag; // mpl sequence tag
|
||||
struct std_pair_tag; // std::pair tag
|
||||
struct std_tuple_tag; // std::tuple tag
|
||||
|
||||
namespace extension
|
||||
{
|
||||
@ -49,12 +50,15 @@ namespace boost { namespace fusion
|
||||
|
||||
template <>
|
||||
struct at_impl<std_pair_tag>;
|
||||
|
||||
template <>
|
||||
struct at_impl<std_tuple_tag>;
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct at
|
||||
struct at
|
||||
: extension::at_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence, N>
|
||||
{};
|
||||
@ -67,7 +71,7 @@ namespace boost { namespace fusion
|
||||
|
||||
|
||||
template <typename N, typename Sequence>
|
||||
inline typename
|
||||
inline typename
|
||||
lazy_disable_if<
|
||||
is_const<Sequence>
|
||||
, result_of::at<Sequence, N>
|
||||
@ -85,7 +89,7 @@ namespace boost { namespace fusion
|
||||
}
|
||||
|
||||
template <int N, typename Sequence>
|
||||
inline typename
|
||||
inline typename
|
||||
lazy_disable_if<
|
||||
is_const<Sequence>
|
||||
, result_of::at_c<Sequence, N>
|
||||
|
Reference in New Issue
Block a user