Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][exception] Wide-character design considerations
From: Emil Dotchevski (emil_at_[hidden])
Date: 2010-06-24 01:53:37


On Wed, Jun 23, 2010 at 10:40 PM, Christoph Heindl
<christoph.heindl_at_[hidden]> wrote:
> On Thu, Jun 24, 2010 at 12:43 AM, Emil Dotchevski
> <emil_at_[hidden]> wrote:
>> The Boost Exception framework itself doesn't set a limitation on what
>> you can stuff in exceptions. You can use something like:
>>
>> typedef boost::error_info<struct wfile_name_,std::wstring> wfile_name;
>>
>> and then you can stuff it in and recover it from exceptions just fine.
>> The only issue is how boost::diagnostic_information (which returns a
>> std::string) will display a wfile_name, and I'm sure whatever it does
>> now isn't correct.
>>
>> So this isn't a trivial problem. Perhaps the correct thing to do is
>> document that boost::diagnostic_information returns a UTF-8 string, I
>> kind of prefer this to the other possibility, to add a
>> boost::wdiagnostic_information.
>
> What about:
>  - having boost::diagnostic_informationreturn a UTF-8 encoded string
> for all error_info containing a std::wstring

What is difference between that and just documenting that
boost::diagnostic_information returns a UTF-8 string *always*?

>  - adding a boost::wdiagnostic_information

If boost::diagnostic_information returns a UTF-8 string,
boost::wdiagnostic_information is a trivial wrapper.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net