|
Boost Testing : |
From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2005-05-14 11:05:16
John Maddock wrote:
>> After some more investigation, I can reproduce the failure when
>> building with bjam, and the tru64cxx65 toolset, there are some
>> differences in how template instantiation is handled (the
>> -timplicit_local option), so I'm going to investigate that next...
>
> And it does appear that the -timplicit_local option is the problem, but
> I'm not sure why yet, especially as it seems to speed up compilation
> quite a bit...
John,
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.
When replacing the char and wchar_t version with the following declaration:
template<> char to_lower(char c);
template<> wchar_t to_lower(wchar_t c);
and the following definition:
template<> char to_lower(char c) { ... }
template<> wchar_t to_lower(wchar_t c) { ... }
the right version of to_lower gets called.
I didn't have time to check if this works without the inline workaround,
but I will do on Tuesday.
Markus