<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - noexcept for a class member function are missed when the function pass over template argument."
href="https://bugs.llvm.org/show_bug.cgi?id=35376">35376</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>noexcept for a class member function are missed when the function pass over template argument.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++14
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>blackmatov@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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: <a href="https://wandbox.org/permlink/xHdPq2R0deTqQ6KG">https://wandbox.org/permlink/xHdPq2R0deTqQ6KG</a>
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;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>