<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Local classes must have an associated namespace since C++14"
href="https://llvm.org/bugs/show_bug.cgi?id=28039">28039</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Local classes must have an associated namespace since C++14
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.8
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</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>roman.perepelitsa@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Example:
template <class T> void Bar(T t) { Foo(t); }
template <class T> void Foo(T) {}
void Test() {
Bar([]{});
}
Clang rejects this code (unexpected behaviour). Bar() should be found by ADL
when compiling with -std=c++14.
Clang's behaviour is correct prior to C++14.
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1690">http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1690</a> has changed
the rules for associated namespaces starting with C++14.
For the record, the twin bug against GCC:
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57433">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57433</a>. GCC finds associated
namespaces according to the new rules. The bug is to make it use the old rules
when compiling with -std=c++11 and below.</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>