explicit82.C: New test.
* g++.old-deja/g++.pt/explicit82.C: New test. * g++.old-deja/g++.pt/explicit83.C: New test. From-SVN: r36316
This commit is contained in:
parent
f2d71db623
commit
6cd0d4dedf
@ -1,3 +1,8 @@
|
||||
2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* g++.old-deja/g++.pt/explicit82.C: New test.
|
||||
* g++.old-deja/g++.pt/explicit83.C: New test.
|
||||
|
||||
2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* gcc.dg/asm-names.c: New test.
|
||||
|
18
gcc/testsuite/g++.old-deja/g++.pt/explicit82.C
Normal file
18
gcc/testsuite/g++.old-deja/g++.pt/explicit82.C
Normal file
@ -0,0 +1,18 @@
|
||||
// Build don't link:
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 7 Sep 2000 <nathan@codesourcery.com>
|
||||
|
||||
// Bug 508. We failed to set/clear lastiddecl appropriately for
|
||||
// operator names.
|
||||
|
||||
struct A {};
|
||||
|
||||
template <typename N> void foo (A, int);
|
||||
template <typename N> void operator<< (A, int);
|
||||
|
||||
int main()
|
||||
{
|
||||
A a;
|
||||
operator<< <bool>(a, 0);
|
||||
foo <bool>(a, 0);
|
||||
}
|
35
gcc/testsuite/g++.old-deja/g++.pt/explicit83.C
Normal file
35
gcc/testsuite/g++.old-deja/g++.pt/explicit83.C
Normal file
@ -0,0 +1,35 @@
|
||||
// Build don't link:
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 7 Sep 2000 <nathan@codesourcery.com>
|
||||
|
||||
// Bug 512. Conversion operator functions in template_id's were always
|
||||
// being looked up in global scope.
|
||||
|
||||
class C
|
||||
{
|
||||
public:
|
||||
|
||||
template <typename T>
|
||||
void f () {}
|
||||
|
||||
template<typename T>
|
||||
operator int ()
|
||||
{ return 0;
|
||||
}
|
||||
};
|
||||
|
||||
template void C::f <int>();
|
||||
|
||||
template C::operator int<float> ();
|
||||
|
||||
template C::operator int<double> ();
|
||||
|
||||
typedef int (C::* ptrmem_t) ();
|
||||
|
||||
template<ptrmem_t U, ptrmem_t V>
|
||||
void foo ()
|
||||
{
|
||||
}
|
||||
|
||||
template void
|
||||
foo<&C::operator int<float>, &C::operator int<double> > ();
|
Loading…
Reference in New Issue
Block a user