[llvm-bugs] [Bug 25179] New: clang (incorrectly) requires template keyword in non-dependent expression
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 14 06:51:35 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=25179
Bug ID: 25179
Summary: clang (incorrectly) requires template keyword in
non-dependent expression
Product: clang
Version: 3.7
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: vanyacpp at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
I believe that in the following example "template" keyword is not required as
expression "f()" is not type dependent. It's a call to a function in current
instantiation and this can not be altered by any specialization.
class B
{
public:
template<typename T>
T f() {
return T{};
}
};
template<typename T>
class C
{
public:
B f()
{
return{};
}
C()
{
f().template f<int>(); // here (!)
}
};
int main()
{
C<int> p;
}
--
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/20151014/cdafb71f/attachment.html>
More information about the llvm-bugs
mailing list