Commit 2851a0e4 by Jeffrey Oldham Committed by Jeffrey D. Oldham

overload15.C: New test to stress overloaded templatized constructors.

2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>

	* g++.old-deja/g++.pt/overload15.C: New test to stress overloaded
	templatized constructors.

From-SVN: r40067
parent 8cf8d8a2
2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
* g++.old-deja/g++.pt/overload15.C: New test to stress overloaded
templatized constructors.
2001-02-24 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* gcc.c-torture/execute/20010224-1.c: New test.
......
// Build don't link:
// Test resolution of templatized overloaded constructors.
// The more specialized constructor, i.e., A (const B<Dim1,Dim2> &b)
// should be chosen per \S 14.5.5.2/2 [temp.func.order/2].
template <int Dim1, int Dim2>
struct B {
int f;
};
struct A {
template <int Dim1, int Dim2>
A (const B<Dim1,Dim2> &b) {}
template <typename T>
A (const T &b) {}
};
int
main ()
{
B<2,3> b;
A a (b);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment