[libcxx-commits] [libcxx] [libcxx][string] Test: default constructed allocators can be unequal (PR #195839)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jun 20 03:44:47 PDT 2026
================
@@ -67,7 +67,10 @@ TEST_CONSTEXPR_CXX20 void test2() {
assert(s.data());
assert(s.size() == 0);
assert(s.capacity() >= s.size());
- assert(s.get_allocator() == typename S::allocator_type());
+# if TEST_STD_VER >= 11
----------------
frederick-vs-ja wrote:
> `decltype` is a C++11+ keyword, which, I believe, is a stronger limitation than library functionality that can be backported.
This is true. But Clang provides extension `__decltype` equivalent to `decltype`, and libc++ defines `decltype` as a macro expanding to `__decltype`. As a result, we can just use `decltype` in C++03 mode in libc++ test suite.
https://github.com/llvm/llvm-project/pull/195839
More information about the libcxx-commits
mailing list