[PATCH] D26596: [RFC] Add _LIBCPP_NO_DISCARD and apply it to unique_ptr<T>::release()
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 13 16:07:22 PST 2016
mclow.lists added a comment.
In https://reviews.llvm.org/D26596#593948, @chandlerc wrote:
> I think we want dedicated macros to disable each added [[nodiscard]].
My concern here is that I expect that there will be a lot of these.
Off the top of my head, I can name:
- Every smart pointer's `get()` and `release()`
- Every container's `empty()`
- A bunch of algorithms (`find()`, `find_if()`, `search()`, and `lower/upper_bound()` leap to mind, but that's not an exhaustive list)
More information about the cfe-commits