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