halbi2 wrote:

> Thank you working on this! Can you explain why we introduce this new 
> attribute in summary?

@yronglin Compiler support for this new attribute is required by @philnik777 
before libc++ can mark its `std::expected` with the `[[nodiscard]]` attribute, 
as requested in #130656 and already done by Microsoft C++, LLVM itself 
(`llvm::Expected`) and Rust. This will bring libc++ up to snuff with other C++ 
implementations.

Personally I do not think this attribute will be used by programmers, it is 
just purely a requirement for fixing #130656.

https://github.com/llvm/llvm-project/pull/154943
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to