Re: glibmm-2.16.4 compile error
- From: Chris Vine <chris cvine freeserve co uk>
- To: Andreas Haumer <andreas xss co at>
- Cc: Murray Cumming <murrayc murrayc com>, gtkmm-list gnome org
- Subject: Re: glibmm-2.16.4 compile error
- Date: Wed, 13 Aug 2008 12:57:30 +0100
On Wed, 13 Aug 2008 12:43:32 +0200
Andreas Haumer <andreas xss co at> wrote:
> In the glibmm sources there are some headers with typdefs using
> "unsigned char", for example in
>
> ./glib/glibmm/ustring.h
> ./glib/glibmm/value_basictypes.h
>
> Perhaps one of those types is (directly or indirectly) used
> as character type in the failing program and so is triggering
> the use of char_traits<unsigned char> somewhere?
>
> The "unsigned char" specialization for the char_traits is only
> available for the char and wchar_t types (according to the docs
> and e.g. <http://gcc.gnu.org/ml/libstdc++/2002-08/msg00098.html>)
There are some casts to unsigned char in the files you mention but I
cannot see any typedefs. Nothing in them looks odd.
char_traits is only required to be specialised for the char and
wchar_t types, which does not include unsigned char. That is why you
are getting the error. I strongly suspect it is something in your
set-up but it may possibly be your compiler or glibmm.
Someone else has suggested the error only arises on compiling the
examples, in which case I suggest doctoring the makefile.
If yours is a home-made linux system, I should update your compiler for
the purposes of compiling the kernel, apart from anything else.
Chris
An aside: People sometimes think that there are two narrow character
types in C and C++, namely signed char and unsigned char. This is
wrong - in C/C++ there are three, namely char, signed char and unsigned
char. char may be signed (whether it is signed or unsigned is
implementation defined), but if it is, it is still a different type
from signed char. This is most likely to show up either when assigning
to pointers or when instantiating templates, and char_traits is a
templated struct.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]