File indexing completed on 2025-01-18 09:33:39
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_DATA_IMPL_HPP
0009 #define BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_DATA_IMPL_HPP
0010
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/iterator/value_of.hpp>
0013 #include <boost/fusion/iterator/deref.hpp>
0014 #include <boost/fusion/support/detail/access.hpp>
0015 #include <boost/type_traits/is_const.hpp>
0016 #include <boost/mpl/if.hpp>
0017
0018 namespace boost { namespace fusion { namespace extension
0019 {
0020 template <typename>
0021 struct deref_data_impl;
0022
0023 template <>
0024 struct deref_data_impl<map_iterator_tag>
0025 {
0026 template <typename It>
0027 struct apply
0028 {
0029 typedef typename result_of::value_of<It>::type::second_type data;
0030
0031 typedef typename
0032 mpl::if_<
0033 is_const<typename It::seq_type>
0034 , typename detail::cref_result<data>::type
0035 , typename detail::ref_result<data>::type
0036 >::type
0037 type;
0038
0039 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0040 static type
0041 call(It const& it)
0042 {
0043 return fusion::deref(it).second;
0044 }
0045 };
0046 };
0047 }}}
0048
0049 #endif