[libcxx-commits] [libcxx] [libc++] Use static_asserts for span::front() and span::back() when possible (PR #119381)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 10 08:10:49 PST 2024


philnik777 wrote:

We could add `__attribute__((diagnose_if(_Extent == 0, "warning", "front() cannot be called on a span of size zero")))`, but that would probably result in lots of false-positives.

https://github.com/llvm/llvm-project/pull/119381


More information about the libcxx-commits mailing list