Boost logo

Boost :

Subject: Re: [boost] [xint] Fifth release -- one more round of reviews, please
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2010-06-13 00:19:27

Hash: SHA1

On 06/12/2010 09:11 PM, Adam Merz wrote:

> Attempting to stream an integer_t to/from a wide stream (e.g.
> std::wcout, std::wcin) fails to compile on MSVC2010 because wide
> streams don't have insertion/extraction operator overloads defined
> for std::string, only for std::wstring.

Oops... I'd completely forgotten wide-character strings.

> To take this a bit further, as you probably know, Windows development
> is heavily biased towards usage of wchar_t over char,

Can you tell I do most of my development work under Linux these days? ;-)

> so it feels somewhat limited (or at least clumsy) that integer_t
> doesn't work directly with wchar_t strings/ streams/pointers. For
> example, integer_t has constructors that take char const*, but no
> constructors that take wchar_t const*; also, xint::to_string
> explicitly returns std::string, with no direct way to get a
> std::wstring instead. It would be nice if this was remedied so that
> working with wchar_t-based types was as painless as it currently is
> for char-based types.

Done. There's one new function (to_wstring), everything else should just
work the way you'd expect it to, whether you're using ASCII strings or
wide-character ones.

The changes have just been uploaded to the Sandbox (haven't updated the
Vault yet). Please take a look and let me know if you see any problems
with the implementation. There shouldn't be.
- --
Chad Nelson
Oak Circle Software, Inc.
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


Boost list run by bdawes at, gregod at, cpdaniel at, john at