https://bugs.llvm.org/show_bug.cgi?id=35376
Bug ID: 35376
Summary: noexcept for a class member function are missed when
the function pass over template argument.
Product: clang
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++14
Assignee: unassignedclangb...@nondot.org
Reporter: blackma...@gmail.com
CC: llvm-bugs@lists.llvm.org
This happens only with -std=c++14 and -std=c++11 flags, but with -std=c++1z
flag is all good.
Link to wandbox demonstration: https://wandbox.org/permlink/xHdPq2R0deTqQ6KG
struct foo {
void boo() noexcept {}
} foo_;
template < typename F >
void should_be_noexcept(F f, foo& t) noexcept(noexcept((t.*f)())) {
(t.*f)();
}
int main() {
void (foo::*f)() noexcept = &foo::boo;
static_assert(noexcept((foo_.*f)()), "%-)"); //
1 safe noexcept
static_assert(noexcept(should_be_noexcept(&foo::boo, foo_)), "no :-("); //
2 miss noexcept
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs