aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/meta.cpp
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-11-26 18:06:08 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-11-26 18:06:08 +0100
commit3899857e08dbeaf9c6f6977e4f0b4e72819135d6 (patch)
tree9baf5e1deb2636eb6579eb4d463517adc0474d5e /test/meta.cpp
parent60a544c8795bc2c355099f74a9b0fda795b13c6a (diff)
Removed remove_const_on_value_type since the meaning is unclear and it is in fact unused.
Extened the meta unit tests.
Diffstat (limited to 'test/meta.cpp')
-rw-r--r--test/meta.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/test/meta.cpp b/test/meta.cpp
index 2c3c2985a..e8c95920b 100644
--- a/test/meta.cpp
+++ b/test/meta.cpp
@@ -43,11 +43,27 @@ void test_meta()
VERIFY(( internal::is_same<float,internal::remove_all<float* const *&>::type >::value));
VERIFY(( internal::is_same<float,internal::remove_all<float* const>::type >::value));
- VERIFY(( internal::is_same<float*,internal::remove_const_on_value_type<const float*>::type >::value));
- VERIFY(( internal::is_same<float&,internal::remove_const_on_value_type<const float&>::type >::value));
- VERIFY(( internal::is_same<float&,internal::remove_const_on_value_type<ConstFloatRef>::type >::value));
+ // test add_const
+ VERIFY(( internal::is_same< internal::add_const<float>::type, const float >::value));
+ VERIFY(( internal::is_same< internal::add_const<float*>::type, float* const>::value));
+ VERIFY(( internal::is_same< internal::add_const<float const*>::type, float const* const>::value));
+ VERIFY(( internal::is_same< internal::add_const<float&>::type, float& >::value));
+
+ // test remove_const
+ VERIFY(( internal::is_same< internal::remove_const<float const* const>::type, float const* >::value));
+ VERIFY(( internal::is_same< internal::remove_const<float const*>::type, float const* >::value));
+ VERIFY(( internal::is_same< internal::remove_const<float* const>::type, float* >::value));
+
+ // test add_const_on_value_type
+ VERIFY(( internal::is_same< internal::add_const_on_value_type<float&>::type, float const& >::value));
+ VERIFY(( internal::is_same< internal::add_const_on_value_type<float*>::type, float const* >::value));
+
+ VERIFY(( internal::is_same< internal::add_const_on_value_type<float>::type, const float >::value));
+ VERIFY(( internal::is_same< internal::add_const_on_value_type<const float>::type, const float >::value));
+
+ VERIFY(( internal::is_same< internal::add_const_on_value_type<const float* const>::type, const float* const>::value));
+ VERIFY(( internal::is_same< internal::add_const_on_value_type<float* const>::type, const float* const>::value));
- VERIFY(( internal::is_same<float&,internal::remove_const_on_value_type<float&>::type >::value));
VERIFY(( internal::is_same<float,internal::remove_reference<float&>::type >::value));
VERIFY(( internal::is_same<const float,internal::remove_reference<const float&>::type >::value));
VERIFY(( internal::is_same<float,internal::remove_pointer<float*>::type >::value));