Ticket #10190: fusion_declval.patch

File fusion_declval.patch, 6.3 KB (added by Niklas Angare <li51ckf02@…>, 8 years ago)
  • include/boost/fusion/container/map/detail/at_impl.hpp

    diff --git a/include/boost/fusion/container/map/detail/at_impl.hpp b/include/boost/fusion/container/map/detail/at_impl.hpp
    index c2a565e..ce9d7a6 100644
    a b  
    99
    1010#include <boost/fusion/support/config.hpp>
    1111#include <boost/fusion/support/detail/access.hpp>
     12#include <boost/utility/declval.hpp>
    1213
    1314namespace boost { namespace fusion
    1415{
    namespace boost { namespace fusion  
    2728            {
    2829                typedef mpl::int_<N::value> index;
    2930                typedef
    30                     decltype(std::declval<Sequence>().get(index()))
     31                    decltype(boost::declval<Sequence>().get(index()))
    3132                type;
    3233
    3334                BOOST_FUSION_GPU_ENABLED
    namespace boost { namespace fusion  
    4344            {
    4445                typedef mpl::int_<N::value> index;
    4546                typedef
    46                     decltype(std::declval<Sequence const>().get(index()))
     47                    decltype(boost::declval<Sequence const>().get(index()))
    4748                type;
    4849
    4950                BOOST_FUSION_GPU_ENABLED
  • include/boost/fusion/container/map/detail/at_key_impl.hpp

    diff --git a/include/boost/fusion/container/map/detail/at_key_impl.hpp b/include/boost/fusion/container/map/detail/at_key_impl.hpp
    index 5b57c4b..81ca615 100644
    a b  
    1212#include <boost/type_traits/is_const.hpp>
    1313#include <boost/mpl/at.hpp>
    1414#include <boost/mpl/identity.hpp>
     15#include <boost/utility/declval.hpp>
    1516
    1617namespace boost { namespace fusion
    1718{
    namespace boost { namespace fusion  
    2930            struct apply
    3031            {
    3132                typedef
    32                     decltype(std::declval<Sequence>().get(mpl::identity<Key>()))
     33                    decltype(boost::declval<Sequence>().get(mpl::identity<Key>()))
    3334                type;
    3435
    3536                BOOST_FUSION_GPU_ENABLED
    namespace boost { namespace fusion  
    4445            struct apply<Sequence const, Key>
    4546            {
    4647                typedef
    47                     decltype(std::declval<Sequence const>().get(mpl::identity<Key>()))
     48                    decltype(boost::declval<Sequence const>().get(mpl::identity<Key>()))
    4849                type;
    4950
    5051                BOOST_FUSION_GPU_ENABLED
  • include/boost/fusion/container/map/detail/value_at_impl.hpp

    diff --git a/include/boost/fusion/container/map/detail/value_at_impl.hpp b/include/boost/fusion/container/map/detail/value_at_impl.hpp
    index f98c580..c51cc12 100644
    a b  
    99
    1010#include <boost/fusion/support/config.hpp>
    1111#include <boost/mpl/at.hpp>
     12#include <boost/utility/declval.hpp>
    1213
    1314namespace boost { namespace fusion
    1415{
    namespace boost { namespace fusion  
    2728            {
    2829                typedef mpl::int_<N::value> index;
    2930                typedef
    30                     decltype(std::declval<Sequence>().get_val(index()))
     31                    decltype(boost::declval<Sequence>().get_val(index()))
    3132                type;
    3233            };
    3334        };
  • include/boost/fusion/container/map/detail/value_at_key_impl.hpp

    diff --git a/include/boost/fusion/container/map/detail/value_at_key_impl.hpp b/include/boost/fusion/container/map/detail/value_at_key_impl.hpp
    index 00a54c4..94d2da4 100644
    a b  
    1212#include <boost/type_traits/is_const.hpp>
    1313#include <boost/mpl/at.hpp>
    1414#include <boost/mpl/identity.hpp>
     15#include <boost/utility/declval.hpp>
    1516
    1617namespace boost { namespace fusion
    1718{
    namespace boost { namespace fusion  
    2930            struct apply
    3031            {
    3132                typedef
    32                     decltype(std::declval<Sequence>().get_val(mpl::identity<Key>()))
     33                    decltype(boost::declval<Sequence>().get_val(mpl::identity<Key>()))
    3334                type;
    3435            };
    3536        };
  • include/boost/fusion/container/map/map_iterator.hpp

    diff --git a/include/boost/fusion/container/map/map_iterator.hpp b/include/boost/fusion/container/map/map_iterator.hpp
    index 1c03d8e..db89738 100644
    a b  
    1212#include <boost/fusion/iterator/iterator_facade.hpp>
    1313#include <boost/mpl/minus.hpp>
    1414#include <boost/mpl/equal_to.hpp>
     15#include <boost/utility/declval.hpp>
    1516
    1617namespace boost { namespace fusion
    1718{
    namespace boost { namespace fusion  
    3738            typedef typename Iterator::sequence sequence;
    3839            typedef typename Iterator::index index;
    3940            typedef
    40                 decltype(std::declval<sequence>().get_val(index()))
     41                decltype(boost::declval<sequence>().get_val(index()))
    4142            type;
    4243        };
    4344
    namespace boost { namespace fusion  
    4748            typedef typename Iterator::sequence sequence;
    4849            typedef typename Iterator::index index;
    4950            typedef
    50                 decltype(std::declval<sequence>().get_val(index()).second)
     51                decltype(boost::declval<sequence>().get_val(index()).second)
    5152            type;
    5253        };
    5354
    namespace boost { namespace fusion  
    5657        {
    5758            typedef typename Iterator::sequence sequence;
    5859            typedef typename Iterator::index index;
    59             typedef decltype(std::declval<sequence>().get_key(index())) key_identity_type;
     60            typedef decltype(boost::declval<sequence>().get_key(index())) key_identity_type;
    6061            typedef typename key_identity_type::type type;
    6162        };
    6263
    namespace boost { namespace fusion  
    6667            typedef typename Iterator::sequence sequence;
    6768            typedef typename Iterator::index index;
    6869            typedef
    69                 decltype(std::declval<sequence>().get(index()))
     70                decltype(boost::declval<sequence>().get(index()))
    7071            type;
    7172
    7273            BOOST_FUSION_GPU_ENABLED
    namespace boost { namespace fusion  
    8384            typedef typename Iterator::sequence sequence;
    8485            typedef typename Iterator::index index;
    8586            typedef
    86                 decltype(std::declval<sequence>().get(index()).second)
     87                decltype(boost::declval<sequence>().get(index()).second)
    8788            type;
    8889
    8990            BOOST_FUSION_GPU_ENABLED