Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/type_traits/test/rank_test.cpp @ 29

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: 883 bytes
Line 
1
2//  (C) Copyright John Maddock 2005.
3//  Use, modification and distribution are subject to the
4//  Boost Software License, Version 1.0. (See accompanying file
5//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7#include "test.hpp"
8#include "check_integral_constant.hpp"
9#ifdef TEST_STD
10#  include <type_traits>
11#else
12#  include <boost/type_traits/rank.hpp>
13#endif
14
15TT_TEST_BEGIN(rank)
16
17BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int>::value, 0);
18BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int[]>::value, 1);
19BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int[][10]>::value, 2);
20BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int[5][10]>::value, 2);
21BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int[5][10][40]>::value, 3);
22BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int (&)[5][10]>::value, 0);
23BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int (*)[5][10]>::value, 0);
24
25TT_TEST_END
26
27
28
29
30
31
32
33
Note: See TracBrowser for help on using the repository browser.