1
2 // Copyright Aleksey Gurtovoy 2001-2004
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // See http://www.boost.org/libs/mpl for documentation.
9
10 // $Id$
11 // $Date$
12 // $Revision$
13
14 #include <boost/mpl/transform_view.hpp>
15
16 #include <boost/mpl/max_element.hpp>
17 #include <boost/mpl/list.hpp>
18 #include <boost/mpl/sizeof.hpp>
19 #include <boost/mpl/equal.hpp>
20 #include <boost/mpl/aux_/test.hpp>
21
MPL_TEST_CASE()22 MPL_TEST_CASE()
23 {
24 typedef list<int,long,char,char[50],double> types;
25 typedef list<
26 sizeof_<int>::type,
27 sizeof_<long>::type,
28 sizeof_<char>::type,
29 sizeof_<char[50]>::type,
30 sizeof_<double>::type
31 > sizes;
32
33 MPL_ASSERT(( equal< transform_view< types, sizeof_<_> >::type,sizes > ));
34
35 typedef max_element<
36 transform_view< types, sizeof_<_> >
37 >::type iter;
38
39 MPL_ASSERT_RELATION( deref<iter>::type::value, ==, 50 );
40 }
41