Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:33:39

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2011 Brandon Kohn
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #if !defined(BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP)
0009 #define BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/support/detail/access.hpp>
0013 #include <boost/type_traits/is_const.hpp>
0014 #include <boost/mpl/at.hpp>
0015 #include <boost/mpl/int.hpp>
0016 
0017 namespace boost { namespace fusion
0018 {
0019     struct map_tag;
0020 
0021     namespace extension
0022     {
0023         template <typename Tag>
0024         struct at_impl;
0025 
0026         template <>
0027         struct at_impl<map_tag>
0028         {
0029             template <typename Sequence, typename N>
0030             struct apply
0031             {
0032                 typedef typename
0033                     mpl::at<typename Sequence::storage_type::types, N>::type
0034                 element;
0035                 typedef typename detail::ref_result<element>::type type;
0036 
0037                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0038                 static type
0039                 call(Sequence& m)
0040                 {
0041                     return m.get_data().at_impl(N());
0042                 }
0043             };
0044 
0045             template <typename Sequence, typename N>
0046             struct apply<Sequence const, N>
0047             {
0048                 typedef typename
0049                     mpl::at<typename Sequence::storage_type::types, N>::type
0050                 element;
0051                 typedef typename detail::cref_result<element>::type type;
0052 
0053                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0054                 static type
0055                 call(Sequence const& m)
0056                 {
0057                     return m.get_data().at_impl(N());
0058                 }
0059             };
0060         };
0061     }
0062 }}
0063 
0064 #endif //BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP