Last change
on this file since 29 was
29,
checked in by landauf, 16 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
1.0 KB
|
Rev | Line | |
---|
[29] | 1 | |
---|
| 2 | // Copyright Aleksey Gurtovoy 2000-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 | // $Source: /cvsroot/boost/boost/libs/mpl/test/at.cpp,v $ |
---|
| 11 | // $Date: 2004/09/02 15:41:35 $ |
---|
| 12 | // $Revision: 1.5 $ |
---|
| 13 | |
---|
| 14 | #include <boost/mpl/at.hpp> |
---|
| 15 | #include <boost/mpl/vector/vector10_c.hpp> |
---|
| 16 | #include <boost/mpl/aux_/test.hpp> |
---|
| 17 | |
---|
| 18 | template< typename Seq, int n > struct at_test |
---|
| 19 | { |
---|
| 20 | typedef typename at_c<Seq,n>::type t; |
---|
| 21 | MPL_ASSERT(( is_same< t, integral_c<int,9-n> > )); |
---|
| 22 | MPL_ASSERT_RELATION( t::value, ==, 9 - n ); |
---|
| 23 | }; |
---|
| 24 | |
---|
| 25 | MPL_TEST_CASE() |
---|
| 26 | { |
---|
| 27 | typedef vector10_c<int,9,8,7,6,5,4,3,2,1,0> numbers; |
---|
| 28 | |
---|
| 29 | at_test< numbers, 0 >(); |
---|
| 30 | at_test< numbers, 1 >(); |
---|
| 31 | at_test< numbers, 2 >(); |
---|
| 32 | at_test< numbers, 3 >(); |
---|
| 33 | at_test< numbers, 4 >(); |
---|
| 34 | at_test< numbers, 5 >(); |
---|
| 35 | at_test< numbers, 6 >(); |
---|
| 36 | at_test< numbers, 7 >(); |
---|
| 37 | at_test< numbers, 8 >(); |
---|
| 38 | at_test< numbers, 9 >(); |
---|
| 39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.