This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25855] template specialisation not always found
- From: "mueller at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2006 11:13:40 -0000
- Subject: [Bug c++/25855] template specialisation not always found
- References: <bug-25855-3563@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from mueller at kde dot org 2006-01-19 11:13 -------
attaching testcase inline for better bugzilla queries:
#ifdef BREAK
template <typename T> bool qCompare(const T *t1, const T
*t2);
template <typename T> bool qCompare(T *t1, T *t2);
#else
template <typename T> bool qCompare(T *t1, T *t2);
template <typename T> bool qCompare(const T *t1, const T
*t2);
#endif
template <typename T1, typename T2> bool qCompare(const T1 *t1, const T2
*t2);
#ifdef WORKAROUND
template<> bool qCompare<char>(const char *t1,
const char *t2)
#else
template<> bool qCompare(const char *t1, const
char *t2)
#endif
{
return true;
}
int main()
{
return !qCompare("a", "b");
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25855