egcs-1.1.2 template explicit instantiation problems (Was: wstring ...)
Steinar Bang
sb@metis.no
Fri Feb 11 03:24:00 GMT 2000
>>>>> Steinar Bang <sb@metis.no>:
>>>>> Steinar Bang <sb@metis.no>:
[snip!]
> But I would rather use the native gcc (which is egcs-1.1.2) if I can,
> so I have tried to do the explicit instantiation myself.
> Unfortunately I still get the linking problems.
> This is what I do:
> #ifdef __GNUC__
> wchar_t* string_char_traits<wchar_t>::move(wchar_t *, wchar_t const *, unsigned int);
> wchar_t* string_char_traits<wchar_t>::copy(wchar_t *, wchar_t const *, unsigned int);
> #endif
Using "template " in front of this statement, like Bjarne III seems to
indicate:
#ifdef __GNUC__
template wchar_t* string_char_traits<wchar_t>::move(wchar_t *, wchar_t const *, unsigned int);
template wchar_t* string_char_traits<wchar_t>::move(wchar_t *, wchar_t const *, unsigned int);
#endif
gives me an error message when compiling:
g++ -c -pipe -DQT_NO_ASCII_CAST -Wall -W -g -fPIC -DQT_FATAL_ASSERT -I/home/sb/2x/include -I/home/sb/apps/qt/include -o .obj/debug/kutf8.o kutf8.cpp
kutf8.cpp:22: template-id `move<>' for `string_char_traits<__wchar_t>::move(__wchar_t *, const __wchar_t *, unsigned int)' does not match any template declaration
kutf8.cpp:22: no matching template for `string_char_traits<__wchar_t>::move(__wchar_t *, const __wchar_t *, unsigned int)' found
kutf8.cpp:23: template-id `move<>' for `string_char_traits<__wchar_t>::move(__wchar_t *, const __wchar_t *, unsigned int)' does not match any template declaration
kutf8.cpp:23: no matching template for `string_char_traits<__wchar_t>::move(__wchar_t *, const __wchar_t *, unsigned int)' found
More information about the Gcc
mailing list