1 .. Sequences/Views//transform_view
25 A view the full range of ``Sequence``\ 's transformed elements.
33 #include <boost/mpl/transform_view.hpp>
45 +---------------+-------------------------------+-------------------------------+
46 | Parameter | Requirement | Description |
47 +===============+===============================+===============================+
48 | ``Sequence`` | |Forward Sequence| | A sequence to wrap. |
49 +---------------+-------------------------------+-------------------------------+
50 | ``F`` | Unary |Lambda Expression| | A transformation. |
51 +---------------+-------------------------------+-------------------------------+
57 |Semantics disclaimer...| |Forward Sequence|.
59 In the following table, ``v`` is an instance of ``transform_view``, ``s`` is an arbitrary
60 |Forward Sequence|, and ``f`` is an unary |Lambda Expression|.
62 +-----------------------------------+-----------------------------------------------------------+
63 | Expression | Semantics |
64 +===================================+===========================================================+
65 | .. parsed-literal:: | A lazy |Forward Sequence| such that for each ``i`` in the |
66 | | range |begin/end<v>| and each ``j`` in for in the range |
67 | transform_view<s,f> | |begin/end<s>| ``deref<i>::type`` is identical to |
68 | transform_view<s,f>::type | ``apply< f, deref<j>::type >::type``. |
69 +-----------------------------------+-----------------------------------------------------------+
70 | ``size<v>::type`` | The size of ``v``; |
71 | | ``size<v>::value == size<s>::value``; |
72 | | linear complexity; see |Forward Sequence|. |
73 +-----------------------------------+-----------------------------------------------------------+
79 Find the largest type in a sequence.
83 typedef vector<int,long,char,char[50],double> types;
85 transform_view< types, size_of<_> >
88 BOOST_MPL_ASSERT_RELATION( deref<iter>::type::value, ==, 50 );
94 |Sequences|, |Views|, |filter_view|, |joint_view|, |zip_view|, |iterator_range|
97 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
98 Distributed under the Boost Software License, Version 1.0. (See accompanying
99 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)