forked from boostorg/fusion
Merge remote-tracking branch 'origin/develop' into denzor200-patch-3
This commit is contained in:
commit
1c5d3ac6f6
18 files changed
+776
-8
No files matched your search
@@ -0,0 +1,12 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2022 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)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_INCLUDE_IDENTITY_VIEW)
|
||||
#define FUSION_INCLUDE_IDENTITY_VIEW
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/view/identity_view.hpp>
|
||||
|
||||
#endif
|
||||
@@ -17,5 +17,6 @@
|
||||
#include <boost/fusion/view/transform_view.hpp>
|
||||
#include <boost/fusion/view/zip_view.hpp>
|
||||
#include <boost/fusion/view/flatten_view.hpp>
|
||||
#include <boost/fusion/view/identity_view.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,14 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2022 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)
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_SEQUENCE_IDENTITY_VIEW_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_SEQUENCE_IDENTITY_VIEW_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/view/identity_view/identity_view.hpp>
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,43 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2022 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)
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_IDENTITY_VIEW_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_IDENTITY_VIEW_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/view/transform_view.hpp>
|
||||
#include <boost/functional/identity.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
namespace detail {
|
||||
struct identity : boost::identity
|
||||
{
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
namespace boost {
|
||||
template<typename T>
|
||||
struct result_of<fusion::detail::identity(T)>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
}
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
template<typename Sequence> struct identity_view
|
||||
: transform_view<Sequence, detail::identity>
|
||||
{
|
||||
typedef transform_view<Sequence, detail::identity> base_type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
identity_view(Sequence& in_seq)
|
||||
: base_type(in_seq, detail::identity()) {}
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,66 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2022 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)
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_TRANSFORM_VIEW_DEREF_DATA_IMPL_JAN_9_2022_0354PM)
|
||||
#define BOOST_FUSION_TRANSFORM_VIEW_DEREF_DATA_IMPL_JAN_9_2022_0354PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct transform_view_iterator_tag;
|
||||
struct transform_view_iterator2_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct deref_data_impl;
|
||||
|
||||
// Unary Version
|
||||
template<>
|
||||
struct deref_data_impl<transform_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
result_of::deref<typename Iterator::first_type>::type
|
||||
value_type;
|
||||
|
||||
typedef typename Iterator::transform_type F;
|
||||
typedef typename boost::result_of<F(value_type)>::type transformed_type;
|
||||
typedef typename boost::remove_reference<transformed_type>::type transformed_type_unref;
|
||||
typedef typename boost::remove_const<transformed_type_unref>::type transformed_type_unconst;
|
||||
|
||||
typedef typename transformed_type_unconst::second_type raw_type;
|
||||
typedef typename
|
||||
boost::mpl::if_<
|
||||
is_reference<transformed_type>
|
||||
, typename boost::mpl::if_<
|
||||
is_const<transformed_type_unref>
|
||||
, typename boost::add_reference<typename boost::add_const<raw_type>::type>::type
|
||||
, typename boost::add_reference<raw_type>::type
|
||||
>::type
|
||||
, raw_type
|
||||
>::type
|
||||
type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return i.f(fusion::deref(i.first)).second;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// Binary Version is not supported with Associative Sequence
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2022 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)
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_TRANSFORM_VIEW_KEY_OF_IMPL_JAN_9_2022_0354PM)
|
||||
#define BOOST_FUSION_TRANSFORM_VIEW_KEY_OF_IMPL_JAN_9_2022_0354PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct transform_view_iterator_tag;
|
||||
struct transform_view_iterator2_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct key_of_impl;
|
||||
|
||||
// Unary Version
|
||||
template<>
|
||||
struct key_of_impl<transform_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
result_of::deref<typename Iterator::first_type>::type
|
||||
value_type;
|
||||
|
||||
typedef typename Iterator::transform_type F;
|
||||
typedef typename boost::result_of<F(value_type)>::type transformed_type;
|
||||
typedef typename boost::remove_reference<transformed_type>::type transformed_type_unref;
|
||||
typedef typename boost::remove_const<transformed_type_unref>::type transformed_type_unconst;
|
||||
|
||||
typedef typename transformed_type_unconst::first_type type;
|
||||
};
|
||||
};
|
||||
|
||||
// Binary Version is not supported with Associative Sequence
|
||||
}
|
||||
}}
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2022 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)
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_TRANSFORM_VIEW_VALUE_OF_IMPL_JAN_9_2022_0354PM)
|
||||
#define BOOST_FUSION_TRANSFORM_VIEW_VALUE_OF_IMPL_JAN_9_2022_0354PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct transform_view_iterator_tag;
|
||||
struct transform_view_iterator2_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct value_of_data_impl;
|
||||
|
||||
// Unary Version
|
||||
template<>
|
||||
struct value_of_data_impl<transform_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
result_of::deref<typename Iterator::first_type>::type
|
||||
value_type;
|
||||
|
||||
typedef typename Iterator::transform_type F;
|
||||
typedef typename boost::result_of<F(value_type)>::type transformed_type;
|
||||
typedef typename boost::remove_reference<transformed_type>::type transformed_type_unref;
|
||||
typedef typename boost::remove_const<transformed_type_unref>::type transformed_type_unconst;
|
||||
|
||||
typedef typename transformed_type_unconst::second_type type;
|
||||
};
|
||||
};
|
||||
|
||||
// Binary Version is not supported with Associative Sequence
|
||||
}
|
||||
}}
|
||||
#endif
|
||||
@@ -19,6 +19,9 @@
|
||||
#include <boost/fusion/view/transform_view/detail/advance_impl.hpp>
|
||||
#include <boost/fusion/view/transform_view/detail/distance_impl.hpp>
|
||||
#include <boost/fusion/view/transform_view/detail/equal_to_impl.hpp>
|
||||
#include <boost/fusion/view/transform_view/detail/key_of_impl.hpp>
|
||||
#include <boost/fusion/view/transform_view/detail/value_of_data_impl.hpp>
|
||||
#include <boost/fusion/view/transform_view/detail/deref_data_impl.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user