re PR c++/39987 (Rejects default argument that is a template via access failure)
2009-08-07 Dodji Seketeli <dodji@redhat.com> PR c++/39987 * gcc/testsuite/g++.dg/overload/defarg4.C: Oops, I foorgot to add this. From-SVN: r150569
This commit is contained in:
parent
54f623ab41
commit
19814a6bb0
|
@ -0,0 +1,26 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/39987
|
||||
// { dg-do "compile" }
|
||||
|
||||
class foo
|
||||
{
|
||||
template<typename U>
|
||||
static bool func(const U& x)
|
||||
{}
|
||||
public:
|
||||
template<typename U>
|
||||
unsigned int Find(const U& x, bool (*pFunc) (const U&) = func) const
|
||||
{}
|
||||
};
|
||||
|
||||
class bar {
|
||||
bool Initialize();
|
||||
protected:
|
||||
foo b;
|
||||
};
|
||||
|
||||
bool bar::Initialize()
|
||||
{
|
||||
b.Find(b);
|
||||
}
|
||||
|
Loading…
Reference in New Issue