[SVN r58901]
This commit is contained in:
John Maddock
2010-01-11 13:04:01 +00:00
parent e7b1b3c773
commit a5f067761a
2 changed files with 5 additions and 2 deletions

View File

@ -14,7 +14,7 @@
};
__type Let `U` be the result of `remove_reference<T>::type`, then if `U` is
an array type, the result is `remove_extent<U>*`, otherwise if `U` is a
an array type, the result is `remove_extent<U>::type*`, otherwise if `U` is a
function type then the result is `U*`, otherwise the result is `U`.
__std_ref 3.9.1.
@ -25,7 +25,7 @@ __header ` #include <boost/type_traits/decay.hpp>` or ` #include <boost/type_tra
[ [Expression] [Result Type]]
[[`decay<int[2][3]>::type`][`int[2]*`]]
[[`decay<int[2][3]>::type`][`int[3]*`]]
[[`decay<int(&)[2]>::type`] [`int*`]]

3
test/decay_test.cpp Executable file → Normal file
View File

@ -62,6 +62,9 @@ TT_TEST_BEGIN(is_class)
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<
::tt::decay<char[2]>::type,char*>::value),
true );
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<
::tt::decay<char[2][3]>::type,char(*)[3]>::value),
true );
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<
::tt::decay<const char[2]>::type,const char*>::value),
true );