[libcxx-commits] [libcxx] [libc++][ranges] add static_assert for ranges::to (PR #135802)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 15 18:07:27 PDT 2025
frederick-vs-ja wrote:
> I’ve written a test referencing the `to.static_assert.verify.cpp` file in the same directory, but it fails to compile.
Compilation failure is exactly expected. Just go ahead.
> Why does a test expecting a failed static assertion pass in lit?
We want to verify that `static_assert` (usually corresponding to _Mandates_ in the standard wording) works.
> What might be wrong with my test implementation?
See other review comments. Also, perhaps we want to verify that const types, volatile types, other arithmetic types, pointer types, pointer-to-member types, enumeration types, _cv_ `void`, reference types, and function types are also rejected.
https://github.com/llvm/llvm-project/pull/135802
More information about the libcxx-commits
mailing list