delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/04/27/23:21:45

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Mail-Followup-To: cygwin-apps AT cygwin DOT com
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: RE: libgetopt++ and setup and libstdc++
Date: Sun, 28 Apr 2002 13:21:41 +1000
X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3
Message-ID: <FC169E059D1A0442A04C40F86D9BA7600C5F3E@itdomain003.itdomain.net.au>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
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>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g3S3Ljb04488


> -----Original Message-----
> From: Gary R. Van Sickle [mailto:g DOT r DOT vansickle AT worldnet DOT att DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019