This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C++, 2.95: Problem with matching of function signatures



// 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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]