1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2005-2006 Dan Marsden
4 Copyright (c) 2018 Kohei Takahashi
6 Distributed under the Boost Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 ==============================================================================*/
9 #if !defined(BOOST_FUSION_VALUE_AT_IMPL_20061101_0745)
10 #define BOOST_FUSION_VALUE_AT_IMPL_20061101_0745
12 #include <boost/fusion/support/config.hpp>
13 #include <boost/fusion/sequence/intrinsic/value_at.hpp>
14 #include <boost/utility/result_of.hpp>
16 namespace boost { namespace fusion {
17 struct transform_view_tag;
18 struct transform_view2_tag;
22 template<typename Tag>
26 struct value_at_impl<transform_view_tag>
28 template<typename Seq, typename N>
31 typedef typename Seq::transform_type F;
32 typedef typename result_of::value_at<typename Seq::sequence_type, N>::type value_type;
33 typedef typename boost::result_of<F(value_type)>::type type;
38 struct value_at_impl<transform_view2_tag>
40 template<typename Seq, typename N>
43 typedef typename Seq::transform_type F;
44 typedef typename result_of::value_at<typename Seq::sequence1_type, N>::type value1_type;
45 typedef typename result_of::value_at<typename Seq::sequence2_type, N>::type value2_type;
46 typedef typename boost::result_of<F(value1_type, value2_type)>::type type;