Boost logo

Boost :

From: Bronek Kozicki (brok_at_[hidden])
Date: 2006-05-11 05:35:48


John Maddock <john_at_[hidden]> wrote:
>>> while porting Boost to evc4 I noticed that Boost.Filesystem makes
>>> heavy use of the Ansi Win32-API functions such as CreateFileA etc.
>>> There is a mode that can be enabled with the define
>>> BOOST_FILESYSTEM_NARROW_ONLY so that only Ansi APIs are used. Is it
>>> thinkable to introduce a BOOST_FILESYSTEM_WIDE_ONLY mode, e.g. when
>>> BOOST_NO_ANSI_APIS is defined? Should I try to implement such a
>>> mode, or is it too complicated?
>>
>> What would the motivation be?
>
> On WinCE there are only wide character file names, you'll get linker
> errors if the narrow character stuff is included.

I could use that too, on "normal" Windows programs compiled under
current verions of VC++ ; just like I avoid std::string and use
std::wstring instead. There are two problems with *A functions:
- (minor) performance cost of conversions, as all strings have to be
converted to and from Unicode (*A variants are just wrappers for *W
variants)
- these conversions are controlled only by user/computer regional
settings, which means that behaviour of program using them will vary
depending on where it's run, if it happens to operate on names
containing non-ASCII characters.

B.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk