This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
RE: libgetopt++ and setup and libstdc++
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- To: "Gary R. Van Sickle" <g dot r dot vansickle at worldnet dot att dot net>,"Cygwin-Apps" <cygwin-apps at cygwin dot com>
- Date: Sun, 28 Apr 2002 13:21:41 +1000
- Subject: RE: libgetopt++ and setup and libstdc++
> -----Original Message-----
> From: Gary R. Van Sickle [mailto:g.r.vansickle@worldnet.att.net]
> Sent: Sunday, April 28, 2002 12:43 PM
> To: Cygwin-Apps
> Subject: RE: libgetopt++ and setup and libstdc++
>
>
> > Ok,
> > we're finally there. Setup now can use libstdc++
> routines, allowing
> > the full range of C++ programming constructs. Probably even
> > exceptions, but I have not tested that yet.
> >
>
> As the late Kool-Aid man once said, "OH YEAH!"!
>
> [snip]
>
> > We can also use the C++ string class. However, except for
> the trivial
> > - such as option parsing - we should still use the cistring or
> > String++ classes, as we need unicode support eventually, and also
> > formatmessage support. They can of course use string as an
> underlying
> > container if appropriate.
> >
>
> There's a cute 'trick' here that gives you the best of both worlds:
>
> typedef basic_string< TCHAR > StringAW;
>
> Now the "StringAW" type is either wide or narrow depending on
> build-time defines.
Except that widechar != unicode. WCHAR is still an 0 terminated string,
but Unicode strings are not 0 terminated. (See the NT kernel defines for
UNICODE_STRING to see how unicode strings are represented.).
Anyway, as we need more than the base string class offers, I see no
reason not to have our own string class..
Rob