File indexing completed on 2025-01-18 09:34:43
0001
0002
0003
0004
0005
0006
0007 #if !defined(FUSION_CONVERT_10022005_1442)
0008 #define FUSION_CONVERT_10022005_1442
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #if BOOST_WORKAROUND(BOOST_GCC, < 30500)
0012 #include <boost/core/enable_if.hpp>
0013 #include <boost/type_traits/is_const.hpp>
0014 #define BOOST_FUSION_WA_GCC34(type1, type2) \
0015 boost::lazy_disable_if<boost::is_const<Sequence>, type1, type2>
0016 #else
0017 #define BOOST_FUSION_WA_GCC34(type1, type2) type1, type2
0018 #endif
0019
0020 namespace boost { namespace fusion
0021 {
0022 namespace extension
0023 {
0024 template <typename Tag>
0025 struct convert_impl;
0026 }
0027
0028 namespace result_of
0029 {
0030 template <typename Tag, typename Sequence>
0031 struct convert
0032 {
0033 typedef typename
0034 extension::convert_impl<Tag>::template apply<Sequence>
0035 gen;
0036
0037 typedef typename gen::type type;
0038 };
0039 }
0040
0041 template <typename Tag, typename Sequence>
0042 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0043 inline typename BOOST_FUSION_WA_GCC34(result_of::convert<Tag, Sequence>)::type
0044 convert(Sequence& seq)
0045 {
0046 typedef typename result_of::convert<Tag, Sequence>::gen gen;
0047 return gen::call(seq);
0048 }
0049
0050 template <typename Tag, typename Sequence>
0051 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0052 inline typename result_of::convert<Tag, Sequence const>::type
0053 convert(Sequence const& seq)
0054 {
0055 typedef typename result_of::convert<Tag, Sequence const>::gen gen;
0056 return gen::call(seq);
0057 }
0058 }}
0059
0060 #undef BOOST_FUSION_WA_GCC34
0061 #endif