...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
single_view
is a view into
a value as a single element sequence.
#include <boost/fusion/view/single_view.hpp> #include <boost/fusion/include/single_view.hpp>
template <typename T> struct single_view;
Parameter |
Description |
Default |
---|---|---|
|
Any type |
Notation
S
A single_view
type
s
, s2
Instances of single_view
x
An instance of T
Semantics of an expression is defined only where it differs from, or is not defined in Forward Sequence.
Expression |
Semantics |
---|---|
|
Creates a |
|
Copy constructs a |
|
Assigns to a |
single_view<int> view(3); std::cout << view << std::endl;