[LLVMbugs] [Bug 16889] New: Clang takes "D" in "t->D::f()" as dependent if "t" is type-dependent
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 14 14:47:56 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16889
Bug ID: 16889
Summary: Clang takes "D" in "t->D::f()" as dependent if "t" is
type-dependent
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: schaub.johannes at googlemail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following snippet is accepted, even though "Dependent" is nondependent.
Since it is non-dependent, it cannot be looked up within the dependent type "T"
(at parse time). Since the surrounding scope provides no "Dependent", the code
should be rejected.
template<typename T>
void f(T t) {
t.Dependent::f(); // clang accepts
}
struct Dependent
{
void f();
};
template void f<Dependent>(Dependent);
An analysis of that code can be found at
http://stackoverflow.com/a/18220574/34509 .
--
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/20130814/add32ee8/attachment.html>
More information about the llvm-bugs
mailing list