[libcxx-commits] [libcxx] [libc++][memory_resource] Applied `[[nodiscard]]` (PR #172134)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 15 02:36:20 PST 2025


================
@@ -68,17 +70,19 @@ operator!=(const memory_resource& __lhs, const memory_resource& __rhs) noexcept
 
 // [mem.res.global]
 
-[[__gnu__::__returns_nonnull__]] _LIBCPP_AVAILABILITY_PMR _LIBCPP_EXPORTED_FROM_ABI memory_resource*
+[[nodiscard]] [[__gnu__::__returns_nonnull__]] _LIBCPP_AVAILABILITY_PMR _LIBCPP_EXPORTED_FROM_ABI memory_resource*
----------------
philnik777 wrote:

```suggestion
[[nodiscard, __gnu__::__returns_nonnull__]] _LIBCPP_AVAILABILITY_PMR _LIBCPP_EXPORTED_FROM_ABI memory_resource*
```

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


More information about the libcxx-commits mailing list