Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*=============================================================================
0002     Copyright (c) 2009 Christopher Schmidt
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 
0008 #ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_IMPL_HPP
0009 #define BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_IMPL_HPP
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/sequence/intrinsic/at.hpp>
0013 #include <boost/type_traits/is_const.hpp>
0014 
0015 namespace boost { namespace fusion { namespace extension
0016 {
0017     template <typename>
0018     struct deref_impl;
0019 
0020     template <>
0021     struct deref_impl<set_iterator_tag>
0022     {
0023         template <typename It>
0024         struct apply
0025         {
0026             typedef typename
0027                 result_of::at<
0028                     typename mpl::if_<
0029                         is_const<typename It::seq_type>
0030                       , typename It::seq_type::storage_type const
0031                       , typename It::seq_type::storage_type
0032                     >::type
0033                   , typename It::index
0034                 >::type
0035             type;
0036 
0037             BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0038             static type
0039             call(It const& it)
0040             {
0041                 return ::boost::fusion::at<typename It::index>(it.seq->get_data());
0042             }
0043         };
0044     };
0045 }}}
0046 
0047 #endif