[libcxx-commits] [libcxx] [libc++] Applied `[[nodiscard]]` to more Language Support classes (PR #171078)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 12 00:16:14 PST 2025


================

----------------
H-G-Hristov wrote:

```suggestion
class [[nodiscard]] _LIBCPP_EXPORTED_FROM_ABI bad_alloc : public exception {
```

Question: @philnik777 @frederick-vs-ja just to confirm as it was already discussed about `std::expected` here https://github.com/llvm/llvm-project/pull/139651 and here https://github.com/llvm/llvm-project/pull/130820 we don't want to annotate any error/exception type classes or any at all with `[[noexcept]]`.
This reasoning should be included in the commit message probably too.

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


More information about the libcxx-commits mailing list