Benoit Blanchon 1 год назад
Родитель
Сommit
5f8e3c0f0f
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      extras/tests/Misc/TypeTraits.cpp

+ 8 - 0
extras/tests/Misc/TypeTraits.cpp

@@ -212,6 +212,14 @@ TEST_CASE("Polyfills/type_traits") {
     CHECK(is_enum<double>::value == false);
   }
 
+  SECTION("remove_cv") {
+    CHECK(is_same<remove_cv_t<const int>, int>::value);
+    CHECK(is_same<remove_cv_t<volatile int>, int>::value);
+    CHECK(is_same<remove_cv_t<const volatile int>, int>::value);
+    CHECK(is_same<remove_cv_t<int>, int>::value);
+    CHECK(is_same<remove_cv_t<decltype("toto")>, decltype("toto")>::value);
+  }
+
   SECTION("decay") {
     CHECK(is_same<decay_t<int>, int>::value);
     CHECK(is_same<decay_t<int&>, int>::value);