Georg Baum <[EMAIL PROTECTED]> writes:
| Lars Gullik Bjønnes wrote:
|
| > Georg Baum <[EMAIL PROTECTED]>
| > writes:
| >
| > | Lars,
| > |
| > | I get several undefined references like this one with current trunk (gcc
| > | 3.3.5, 32 bit):
| >
| > Your gcc is too old, and to fix it we must provide the specialization
| > fo char_traits<boost::uint32_t> ourselves. Gcc4 has better QoI and
| > does the work for us.
|
| This patch adds the missing bits, and the resulting executable works fine.
| The question now is: where should the stuff go? I put it in docstring.h,
| because it is in a header file in gcc 4.2 and docstring.h must be included
| anyway if the unicode strings are used. We could as well put an explicit
| specialization in a .C file (which one?).
|
| Lars, please advise.
This does not look like the right approach.
My plan was to snatch (steal) the char_traits<T> code from gcc4 and
then just add the specialization for boost:uint32_t.
| Index: src/support/docstring.h
| ===================================================================
| --- src/support/docstring.h (Revision 14671)
| +++ src/support/docstring.h (Arbeitskopie)
| @@ -25,4 +25,57 @@ typedef std::basic_string<boost::uint32_
|
| }
|
| +#if defined(__GNUC__) && __GNUC__ < 4
| +// Missing char_traits methods in gcc 3.x. Taken from gcc 4.2svn.
| +// These are not complete, just what we use.
Ahh... that is what you have done.
But we should not add the templates ourself I think. Only the explit
specialization of the functions.
And we should make it be complete. (gut feeling...)
--
Lgb