[LLVMbugs] [Bug 18574] New: clang++ accepts invalid using-directive
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jan 21 15:17:54 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18574
Bug ID: 18574
Summary: clang++ accepts invalid using-directive
Product: clang
Version: 3.3
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: pipping at exherbo.org
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Please consider the following snippet of code:
<<SNIP
template <typename T> struct A {
typedef int type;
};
template <typename T> struct B : public A<T> {
//typedef typename A<T>::type type;
//using type = typename A<T>::type;
using typename A<T>::type;
static const int block_size = type::block_size;
};
<<SNAP
Specifically, the line
using typename A<T>::type;
Unlike the two lines just above it, this is not valid C++ from my understanding
(one of the other two lines is C++11, the other is pre-C++11).
g++ 4.7.2 rejects the line in question. clang 3.4 accepts it.
--
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/20140121/8035d475/attachment.html>
More information about the llvm-bugs
mailing list