[libcxx-commits] [PATCH] D126737: [libc++][test] Enable constexpr string comparison tests

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 1 00:57:29 PDT 2022


philnik added inline comments.


================
Comment at: libcxx/test/std/strings/string.view/string.view.comparison/equal.pass.cpp:10
 // <string_view>
 
 // template<class charT, class traits>
----------------
Pre-existing: These tests should only be enabled for libc++ pre-C++17.


================
Comment at: libcxx/test/std/strings/string.view/string.view.comparison/equal.pass.cpp:55-56
 
-            if (!TEST_IS_CONSTANT_EVALUATED) {
-                // TODO FIXME: once P0980 "Making std::string constexpr" is implemented
-                assert((std::basic_string<CharT, Traits>(v[i]) == v[j]) == expected);
----------------
These tests should be enabled for C++20 constant evaluation. You probably have to add a function or macro like `is_cxx20_or_runtime_evaluated()`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126737/new/

https://reviews.llvm.org/D126737



More information about the libcxx-commits mailing list