summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/type_traits/test/copy_cv_test.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/libs/type_traits/test/copy_cv_test.cpp
parentInitial commit. (diff)
downloadceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.tar.xz
ceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/type_traits/test/copy_cv_test.cpp')
-rw-r--r--src/boost/libs/type_traits/test/copy_cv_test.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/boost/libs/type_traits/test/copy_cv_test.cpp b/src/boost/libs/type_traits/test/copy_cv_test.cpp
new file mode 100644
index 000000000..6c5ec3e60
--- /dev/null
+++ b/src/boost/libs/type_traits/test/copy_cv_test.cpp
@@ -0,0 +1,44 @@
+
+// Copyright Peter Dimov 2015
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt)
+
+#ifdef TEST_STD
+# include <type_traits>
+#else
+# include <boost/type_traits/copy_cv.hpp>
+#endif
+#include "test.hpp"
+#include "check_type.hpp"
+#include <iostream>
+
+TT_TEST_BEGIN(copy_cv)
+{
+ BOOST_CHECK_TYPE3(tt::copy_cv<int, void>::type, int);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int const, void>::type, int const);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void>::type, int volatile);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void>::type, int const volatile);
+
+ BOOST_CHECK_TYPE3(tt::copy_cv<int, void const>::type, int const);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int const, void const>::type, int const);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void const>::type, int const volatile);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void const>::type, int const volatile);
+
+ BOOST_CHECK_TYPE3(tt::copy_cv<int, void volatile>::type, int volatile);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int const, void volatile>::type, int const volatile);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void volatile>::type, int volatile);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void volatile>::type, int const volatile);
+
+ BOOST_CHECK_TYPE3(tt::copy_cv<int, void const volatile>::type, int const volatile);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int const, void const volatile>::type, int const volatile);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void const volatile>::type, int const volatile);
+ BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void const volatile>::type, int const volatile);
+
+ BOOST_CHECK_TYPE3(tt::copy_cv<int&, void const volatile>::type, int&);
+
+ BOOST_CHECK_TYPE3(tt::copy_cv<int const*, void volatile>::type, int const* volatile);
+
+ BOOST_CHECK_TYPE3(tt::copy_cv<long, int const volatile&>::type, long);
+}
+TT_TEST_END