Boost logo

Boost :

Subject: Re: [boost] Policy about non-compliant standard headers
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-09-21 12:38:31


On Sat, Sep 21, 2013 at 8:27 PM, Marc Glisse <marc.glisse_at_[hidden]> wrote:

> On Sat, 21 Sep 2013, Andrey Semashev wrote:
>
> On Sat, Sep 21, 2013 at 7:54 PM, Marc Glisse <marc.glisse_at_[hidden]>
>> wrote:
>>
>> On Sat, 21 Sep 2013, Andrey Semashev wrote:
>>>
>>> On Sat, Sep 21, 2013 at 3:30 PM, Jonathan Wakely
>>>
>>>> <jwakely.boost_at_[hidden]>****wrote:
>>>>
>>>>
>>>> On 21 September 2013 08:31, Andrey Semashev wrote:
>>>>
>>>>>
>>>>> Hi,
>>>>>>
>>>>>> I was reported an issue with Boost.Log which fails to compile with Sun
>>>>>>
>>>>>> Pro
>>>>>
>>>>> compiler because it has non-compliant standard C headers.
>>>>>>
>>>>>>
>>>>> Non-compliant in what way? Solaris headers are usually pretty strict.
>>>>>
>>>>>
>>>> Missing std::swprintf/std::vswprintf.
>>>>
>>>> https://svn.boost.org/trac/****boost/ticket/9140>
>>>> <
https://svn.**boost.org/trac/boost/ticket/**9140>
>>>> >
>>>>
>>>>
>>> Well, it is boost that is broken. snprintf is not part of C++03, you
>>> can't
>>> count on cstdio providing it. And in C++11 (when solaris will support
>>> that), cstdio will provide std::snprintf but still not ::snprintf unless
>>> Oracle completely changes the way solaris headers are organized.
>>>
>>>
>> It's not about snprintf, it's about swprintf and vswprintf, both of which
>> are in C++98 standard.
>>
>
> In namespace std if you include cwchar, and in the global namespace if you
> include wchar.h. The boost header currently includes cwchar and tries to
> use ::swprintf, that's just wrong.
>

Yes, you're correct. I'll fix the header then.


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