This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
C++, 2.95: Problem with matching of function signatures
- To: gcc-bugs at gcc dot gnu dot org
- Subject: C++, 2.95: Problem with matching of function signatures
- From: Wolfgang Bangerth <wolf at gaia dot iwr dot uni-heidelberg dot de>
- Date: Thu, 12 Aug 1999 20:01:48 +0200 (MET DST)
// This is a rather new error, since I haven't seen it two or
// three month before 2.95. Somehow g++ can't match functions with
// the same signature.
//
// Configuration:
// gcc version 2.95 19990728 (release)
// sparc-sun-solaris2.6
//
// gcc output:
// tmp/x> c++ -c x.cc
// x.cc:32: prototype for `T<y>::T(const double
(&)[T<y>::array_size])' does not match any in class `T<y>'
// x.cc:27: candidate is: T<y>::T(const double (&)[T<y>::array_size])
// x.cc: In method `T<y>::T(const double (&)[T<y>::array_size])':
// x.cc:32: template definition of non-template `T<y>::T(const double
(&)[T<y>::array_size])'
//
// Anyway, we feel deeply indebted to you gcc-authors! Go on!
// Best regards
// Wolfgang
//
template <int y>
class T
{
public:
static const unsigned int array_size = 1;
typedef double array_type[array_size];
T (const array_type &array);
};
template <int y>
T<y>::T (const array_type &)
{};
-------------------------------------------------------------------------
Wolfgang Bangerth email: wolfgang.bangerth@iwr.uni-heidelberg.de
www: http://gaia.iwr.uni-heidelberg.de/~wolf