[all-commits] [llvm/llvm-project] ab52e9: [libc++] Add static_assert diagnostics for LWG3133...
Yordan Vásquez via All-commits
all-commits at lists.llvm.org
Sat Sep 26 09:28:16 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ab52e9f971d626346d70190df72636b477f6c089
https://github.com/llvm/llvm-project/commit/ab52e9f971d626346d70190df72636b477f6c089
Author: Yordan Vásquez <vyordangiovani at gmail.com>
Date: 2026-09-27 (Sun, 27 Sep 2026)
Changed paths:
M libcxx/include/complex
M libcxx/include/valarray
A libcxx/test/std/numerics/complex.number/complex/complex_requires_cv_unqualified_object.verify.cpp
A libcxx/test/std/numerics/numarray/template.valarray/valarray_requires_cv_unqualified_object.verify.cpp
Log Message:
-----------
[libc++] Add static_assert diagnostics for LWG3133 named requirements (#212360)
Add a static_assert to both std::complex<T> and std::valarray<T>
requiring that T be a cv-unqualified object type that satisfies the
Cpp17DefaultConstructible, Cpp17CopyConstructible, Cpp17CopyAssignable,
and Cpp17Destructible named requirements, per the revised wording in
[numeric.requirements]. This mirrors the existing pattern already used
by std::optional<T>.
Non-_v (class-style) trait forms are used throughout so that the
assertion is well-formed even when <complex>/<valarray> are included in
C++03/11/14 mode.
Test coverage:
- A .verify.cpp for complex<T> and one for valarray<T>, each covering
six failure modes: cv-qualified types, and one type violating each of
the four named requirements individually.
Follows-up e062a29cf865bb7cadea6cb605c9f3515e5b883f.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list