[all-commits] [llvm/llvm-project] 4b7bad: [libc++] Implement D2351R0 "Mark all library stati...
Quuxplusone via All-commits
all-commits at lists.llvm.org
Mon Apr 12 09:30:00 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4b7bad9eaea2233521a94f6b096aaa88dc584e23
https://github.com/llvm/llvm-project/commit/4b7bad9eaea2233521a94f6b096aaa88dc584e23
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date: 2021-04-12 (Mon, 12 Apr 2021)
Changed paths:
M libcxx/docs/UsingLibcxx.rst
M libcxx/include/cstddef
M libcxx/include/functional
M libcxx/include/type_traits
M libcxx/include/utility
M libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
M libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
M libcxx/test/std/utilities/utility/forward/forward.fail.cpp
Log Message:
-----------
[libc++] Implement D2351R0 "Mark all library static cast wrappers as [[nodiscard]]"
These [[nodiscard]] annotations are added as a conforming extension;
it's unclear whether the paper will actually be adopted and make them
mandatory, but they do seem like good ideas regardless.
https://isocpp.org/files/papers/D2351R0.pdf
This patch implements the paper's effect on:
- std::to_integer, std::to_underlying
- std::forward, std::move, std::move_if_noexcept
- std::as_const
- std::identity
The paper also affects (but libc++ does not yet have an implementation of):
- std::bit_cast
Differential Revision: https://reviews.llvm.org/D99895
More information about the All-commits
mailing list