Skip to content

Commit 5f8e3c0

Browse files
committed
Polyfills: test remove_cv
1 parent afc0a29 commit 5f8e3c0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

extras/tests/Misc/TypeTraits.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,14 @@ TEST_CASE("Polyfills/type_traits") {
212212
CHECK(is_enum<double>::value == false);
213213
}
214214

215+
SECTION("remove_cv") {
216+
CHECK(is_same<remove_cv_t<const int>, int>::value);
217+
CHECK(is_same<remove_cv_t<volatile int>, int>::value);
218+
CHECK(is_same<remove_cv_t<const volatile int>, int>::value);
219+
CHECK(is_same<remove_cv_t<int>, int>::value);
220+
CHECK(is_same<remove_cv_t<decltype("toto")>, decltype("toto")>::value);
221+
}
222+
215223
SECTION("decay") {
216224
CHECK(is_same<decay_t<int>, int>::value);
217225
CHECK(is_same<decay_t<int&>, int>::value);

0 commit comments

Comments
 (0)