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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs