forked from boostorg/fusion
[identity_view] Added boost::fusion::identity_view
This commit is contained in:
@@ -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,27 @@
|
||||
/*=============================================================================
|
||||
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>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
template<typename Sequence> struct identity_view
|
||||
: transform_view<Sequence, boost::identity>
|
||||
{
|
||||
typedef transform_view<Sequence, boost::identity> base_type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
identity_view(Sequence& in_seq)
|
||||
: base_type(in_seq, boost::identity()) {}
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user