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]
Other format: [Raw text]

[Bug c++/25855] template specialisation not always found (partial ordering)



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-01-19 14:29 -------
Here is what is happening here:
template <typename T>  int qCompare(const T *t1, const T *t2) { return 1; }
template <typename T>  int qCompare(T *t1, T *t2) { return 2; }
template <typename T1, typename T2> int qCompare(const T1 *t1, const T2 *t2) {
return 3; }
template<> int qCompare(const char *t1, const char *t2) { return 4; }

The last qCompare is specializing qCompare(const T1 *t1, const T2 *t2) but we
are choosing the first one as shown by the example DR 214.

So I think this bug is in fact invalid and GCC is doing the correct thing
according to these DR's.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25855


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