[libcxx-commits] [libcxx] [libc++][regex] Applied `[[nodiscard]]` (PR #170974)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Dec 15 02:39:12 PST 2025
================
@@ -2412,16 +2412,16 @@ public:
# endif // _LIBCPP_CXX03_LANG
// const operations:
- _LIBCPP_HIDE_FROM_ABI unsigned mark_count() const { return __marked_count_; }
- _LIBCPP_HIDE_FROM_ABI flag_type flags() const { return __flags_; }
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI unsigned mark_count() const { return __marked_count_; }
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI flag_type flags() const { return __flags_; }
// locale:
- _LIBCPP_HIDE_FROM_ABI locale_type imbue(locale_type __loc) {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI locale_type imbue(locale_type __loc) {
----------------
philnik777 wrote:
This looks incorrect. I don't think you usually care about the return type.
https://github.com/llvm/llvm-project/pull/170974
More information about the libcxx-commits
mailing list