Quuxplusone added a comment.

> I think it wouldn't be unreasonable to ask standard library maintainers to 
> add `[[nodiscard]]` to `std::move`

+1. Also `std::forward`, for sure. Basically any metaprogramming function that 
is statically known to return a reference to its argument.
This knowledge is already in the brains of library vendors; they ought to just 
write it down in the form of `[[nodiscard]]` annotations. This PR smells like 
Clang is trying to "cut out the middleman" and just make up its own proprietary 
list of metaprogramming functions that are statically known to return 
references to arguments, which is not the most effective or futureproof way to 
go about it. Let the library vendors deal with it, please, says me.


Repository:
  rC Clang

https://reviews.llvm.org/D45163



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to