Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:00

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2005-2006 Dan Marsden
0004     Copyright (c) 2018 Kohei Takahashi
0005 
0006     Distributed under the Boost Software License, Version 1.0. (See accompanying
0007     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0008 ==============================================================================*/
0009 #if !defined(BOOST_FUSION_VALUE_AT_IMPL_20061101_0745)
0010 #define BOOST_FUSION_VALUE_AT_IMPL_20061101_0745
0011 
0012 #include <boost/fusion/support/config.hpp>
0013 #include <boost/fusion/sequence/intrinsic/value_at.hpp>
0014 #include <boost/utility/result_of.hpp>
0015 
0016 namespace boost { namespace fusion {
0017     struct transform_view_tag;
0018     struct transform_view2_tag;
0019 
0020     namespace extension
0021     {
0022         template<typename Tag>
0023         struct value_at_impl;
0024 
0025         template<>
0026         struct value_at_impl<transform_view_tag>
0027         {
0028             template<typename Seq, typename N>
0029             struct apply
0030             {
0031                 typedef typename Seq::transform_type F;
0032                 typedef typename result_of::value_at<typename Seq::sequence_type, N>::type value_type;
0033                 typedef typename boost::result_of<F(value_type)>::type type;
0034             };
0035         };
0036 
0037         template<>
0038         struct value_at_impl<transform_view2_tag>
0039         {
0040             template<typename Seq, typename N>
0041             struct apply
0042             {
0043                 typedef typename Seq::transform_type F;
0044                 typedef typename result_of::value_at<typename Seq::sequence1_type, N>::type value1_type;
0045                 typedef typename result_of::value_at<typename Seq::sequence2_type, N>::type value2_type;
0046                 typedef typename boost::result_of<F(value1_type, value2_type)>::type type;
0047             };
0048         };
0049     }
0050 }}
0051 
0052 #endif