http://llvm.org/bugs/show_bug.cgi?id=22443
Bug ID: 22443
Summary: Issues with using-declaration in class
Product: clang
Version: 3.5
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Sample code:
template<class V>
struct B
{
template<class T>
T f() { return T(); }
};
template<class V>
struct D : public B<V>
{
typedef B<V> base;
using base::f;
template<class T>
void f(T &v) { v = f<T>(); }
};
int main()
{
int n ;
D<void>().f(n);
}
Error message:
14 : error: no matching member function for call to 'f'
void f(T &v) { v = f<T>(); }
^~~~
20 : note: in instantiation of function template specialization 'D::f'
requested here
D<void>().f(n);
^
14 : note: candidate function template not viable: requires single argument
'v', but no arguments were provided
void f(T &v) { v = f<T>(); }
^
With GCC this works well. I suppose using-declaration must bring all
identifiers from base class.
--
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