Applied fixes for reverse_view

This commit is contained in:
denzor200
2021-11-07 23:07:18 +04:00
parent 380a2bc7a0
commit 95cf8bdb8d
4 changed files with 19 additions and 20 deletions

View File

@ -1,5 +1,6 @@
/*=============================================================================
Copyright (c) 2009 Christopher Schmidt
Copyright (c) 2021 Denis Mikhailov
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -9,7 +10,7 @@
#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/iterator/deref_data.hpp>
#include <boost/fusion/view/reverse_view/detail/deref_impl.hpp>
namespace boost { namespace fusion { namespace extension
{
@ -18,22 +19,8 @@ namespace boost { namespace fusion { namespace extension
template <>
struct deref_data_impl<reverse_view_iterator_tag>
{
template <typename It>
struct apply
{
typedef typename
result_of::deref_data<typename It::first_type>::type
type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(It const& it)
{
return fusion::deref_data(it.first);
}
};
};
: deref_impl<reverse_view_iterator_tag>
{};
}}}
#endif

View File

@ -1,5 +1,6 @@
/*=============================================================================
Copyright (c) 2009 Christopher Schmidt
Copyright (c) 2021 Denis Mikhailov
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -10,6 +11,7 @@
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/iterator/key_of.hpp>
#include <boost/fusion/iterator/prior.hpp>
namespace boost { namespace fusion { namespace extension
{
@ -21,8 +23,15 @@ namespace boost { namespace fusion { namespace extension
{
template <typename It>
struct apply
: result_of::key_of<typename It::it_type>
{};
{
typedef typename
result_of::key_of<
typename result_of::prior<
typename It::first_type
>::type
>::type
type;
};
};
}}}

View File

@ -1,5 +1,6 @@
/*=============================================================================
Copyright (c) 2009 Christopher Schmidt
Copyright (c) 2021 Denis Mikhailov
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -10,6 +11,7 @@
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/iterator/value_of_data.hpp>
#include <boost/fusion/view/reverse_view/detail/value_of_impl.hpp>
namespace boost { namespace fusion { namespace extension
{
@ -21,7 +23,7 @@ namespace boost { namespace fusion { namespace extension
{
template <typename It>
struct apply
: result_of::value_of_data<typename It::first_type>
: value_of_impl<reverse_view_iterator_tag>
{};
};
}}}

View File

@ -1,5 +1,6 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2021 Denis Mikhailov
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)