[llvm-bugs] [Bug 28039] New: Local classes must have an associated namespace since C++14
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 7 08:08:38 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28039
Bug ID: 28039
Summary: Local classes must have an associated namespace since
C++14
Product: clang
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangbugs at nondot.org
Reporter: roman.perepelitsa at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
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.
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1690 has changed
the rules for associated namespaces starting with C++14.
For the record, the twin bug against GCC:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57433. 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160607/ed959783/attachment-0001.html>
More information about the llvm-bugs
mailing list