[LLVMbugs] [Bug 15575] New: Bogus error when calling variadic template member function
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 22 20:16:31 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15575
Bug ID: 15575
Summary: Bogus error when calling variadic template member
function
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: zeratul976 at hotmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
For the following code:
struct blank {};
template <typename T>
struct result_builder
{
template <typename... Blanks>
void apply(Blanks... blanks);
};
template <typename T>
void waldo()
{
result_builder<T> r;
typedef decltype(r.apply(blank{})) wally;
};
int main()
{
waldo<int>();
}
clang (r177790) gives the following compiler error:
test.cpp:131:24: error: no matching member function for call to 'apply'
typedef decltype(r.apply(blank{})) wally;
~~^~~~~
test.cpp:136:5: note: in instantiation of function template specialization 'wal
waldo<int>();
^
test.cpp:124:10: note: candidate function not viable: requires 0 arguments, but
void apply(Blanks... blanks);
^
I believe this code is valid. It compiles with GCC.
--
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/20130323/8794f276/attachment.html>
More information about the llvm-bugs
mailing list