This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25238] Regression in compiling c++
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Dec 2005 03:10:20 -0000
- Subject: [Bug c++/25238] Regression in compiling c++
- References: <bug-25238-11113@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-12-03 03:10 -------
(In reply to comment #4)
> Created an attachment (id=10395)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10395&action=view) [edit]
> gzipped preprocessed file for _cdsVector.cc from gcc 4.1.0
That is a different issue (again invalid), it comes down to:
template <typename A> class b {double g();};
template<class A> int f(const b<A> &a)
{
return f(a.g());
}
int f(const double &a)
{
return a;
}
the overloaded set for f in f is only the template function since that is what
the C++ standard says it is. You can add a prototype before the template
function which will fix the issue.
This is:
template<class T>
float_type
norm(const CDSVector<T>& v)
And
double
norm(const double& v)
Both in _cdsVector.cc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25238