[libc++] [test] Detect an improperly noexcept'ed __decay_copy.
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Sun, 11 Apr 2021 22:38:24 +0000 (18:38 -0400)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Mon, 12 Apr 2021 16:28:01 +0000 (12:28 -0400)
commitd7eb797ea55c76c7a71886343e216be27d5757be
tree627239a3dee14f05bd2d5b848f461d672e6a39bd
parent330619a3a623d623944c58ebc06cbb83ac0e58af
[libc++] [test] Detect an improperly noexcept'ed __decay_copy.

`__decay_copy` is used by `std::thread`'s constructor to copy its arguments
into the new thread. If `__decay_copy` claims to be noexcept, but then
copying the argument does actually throw, we'd call std::terminate instead
of passing this test. (And I've verified that adding an unconditional `noexcept`
to `__decay_copy` does indeed fail this test.)

Differential Revision: https://reviews.llvm.org/D100277
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp