...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Front Page / Sequences / Views / transform_view |
template< typename Sequence , typename F > struct transform_view { // unspecified // ... };
A view the full range of Sequence's transformed elements.
#include <boost/mpl/transform_view.hpp>
Parameter | Requirement | Description |
---|---|---|
Sequence | Forward Sequence | A sequence to wrap. |
F | Unary Lambda Expression | A transformation. |
The semantics of an expression are defined only where they differ from, or are not defined in Forward Sequence.
In the following table, v is an instance of transform_view, s is an arbitrary Forward Sequence, and f is an unary Lambda Expression.
Expression | Semantics |
---|---|
transform_view |
A lazy Forward Sequence such that for each i in the
range [begin |
size |
The size of v;
size |
Find the largest type in a sequence.
typedef vectortypes; typedef max_element< transform_view< types, size_of<_> > >::type iter; BOOST_MPL_ASSERT_RELATION( deref ::type::value, ==, 50 );