...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
identity_view
presents underlying
sequence unchanged.
#include <boost/fusion/view/identity_view.hpp> #include <boost/fusion/include/identity_view.hpp>
template <typename Sequence> struct identity_view;
Parameter |
Description |
Default |
---|---|---|
|
Sequence
is a Forward
Sequence else, Bidirectional
Sequence if Sequence
is a Bidirectional
Sequence else, Random
Access Sequence if Sequence
is a Random
Access Sequence.
Sequence
implements the Associative
Sequence model.
Notation
IV
An identity_view
type
s
An instance of Sequence
iv
, iv2
Instances of identity_view
Semantics of an expression is defined only where it differs from, or is not defined in the implemented models.
Expression |
Semantics |
---|---|
|
Creates an |
|
Copy constructs an |
|
Assigns to an |
typedefvector
<int, short, double> vector_type; vector_type vec(2, 5, 3.3);identity_view
<vector_type> identity(vec); std::cout << identity << std::endl; // (2 5 3.3)