Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:31:07

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #if !defined(BOOST_FUSION_AT_IMPL_09242011_1744)
0008 #define BOOST_FUSION_AT_IMPL_09242011_1744
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <tuple>
0012 #include <utility>
0013 #include <boost/mpl/if.hpp>
0014 #include <boost/fusion/support/detail/access.hpp>
0015 #include <boost/type_traits/remove_const.hpp>
0016 
0017 namespace boost { namespace fusion
0018 {
0019     struct std_tuple_tag;
0020 
0021     namespace extension
0022     {
0023         template<typename T>
0024         struct at_impl;
0025 
0026         template <>
0027         struct at_impl<std_tuple_tag>
0028         {
0029             template <typename Sequence, typename N>
0030             struct apply
0031             {
0032                 typedef typename remove_const<Sequence>::type seq_type;
0033                 typedef typename std::tuple_element<N::value, seq_type>::type element;
0034 
0035                 typedef typename
0036                     mpl::if_<
0037                         is_const<Sequence>
0038                       , typename fusion::detail::cref_result<element>::type
0039                       , typename fusion::detail::ref_result<element>::type
0040                     >::type
0041                 type;
0042 
0043                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0044                 static type
0045                 call(Sequence& seq)
0046                 {
0047                     return std::get<N::value>(seq);
0048                 }
0049             };
0050         };
0051     }
0052 }}
0053 
0054 #endif