[PATCH] D27436: [libcxx] [test] std::get<0>([std::variant constant expression]) *is* noexcept
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 5 17:49:10 PST 2016
EricWF accepted this revision.
EricWF added inline comments.
This revision is now accepted and ready to land.
================
Comment at: test/std/utilities/variant/variant.get/get_index.pass.cpp:39
constexpr V v(42);
- ASSERT_NOT_NOEXCEPT(std::get<0>(v));
+#ifndef __clang__
+ ASSERT_NOEXCEPT(std::get<0>(v));
----------------
CaseyCarter wrote:
> THAT'S RIGHT, A CLANG BUG (https://llvm.org/bugs/show_bug.cgi?id=15481) THAT C1XX GETS CORRECT. You saw it here first.
Ha A clang bug indeed! Although IDK how sane the other behavior is, specifically:
```
constexpr bool foo() noexcept(false) { return true; }
static_assert(!noexcept(foo()));
```
This part of the change LGTM, but could you also add a test that the function is not noexcept when it cannot do constant evaluation?
https://reviews.llvm.org/D27436
More information about the cfe-commits
mailing list