Boost logo

Boost Testing :

From: John Maddock (john_at_[hidden])
Date: 2005-05-15 05:21:34


> I think I found a solution to the problem, but unfortunately I'm not in
> the office until next Tuesday, therefore I can't check to be sure.
>
> But from the top of my head, somewhere in the regex library there are
> template functions to_lower and to_upper which look like this:
>
> template <class CharT> inline
> CharT to_lower(CharT c) { return c; }
>
> and then
>
> char to_lower(char c);
> wchar_t to_lower(wchar_t c);
>
> The failing regression tests are due to the fact that the template version
> is called, both for char and wchar_t.

Yes, the compiler doesn't differentiate between templates and non-template
overloads of the same name, what's more if the primary template is inline,
then all it's overloads have to be as well, otherwise they pretty much just
get ignored! I've just tested a fix (it works!), so thankfully I think this
one is settled now, many thanks for your help,

John.


Boost-testing list run by mbergal at meta-comm.com