[libcxx-commits] [PATCH] D98151: [libcxx] adds std::identity to <functional>
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 26 14:31:45 PDT 2021
Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.
LGTM modulo the two unaddressed comments I see: "move the mention in the synopsis" and "add a test for noexceptness" (which I've taken the liberty of drafting).
================
Comment at: libcxx/include/functional:3240
+ template<class _Tp>
+ constexpr _Tp&& operator()(_Tp&& __t) const noexcept
+ {
----------------
Mordante wrote:
> Can you add a test that this function is `noexcept`?
+1
```
struct X { X(const X&); X(X&&); };
void test_noexcept() {
X x;
static_assert(noexcept(id(x)));
static_assert(noexcept(id(X()));
};
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98151/new/
https://reviews.llvm.org/D98151
More information about the libcxx-commits
mailing list