Boost logo

Boost :

From: Gavin Lambert (boost_at_[hidden])
Date: 2023-04-28 01:16:42


On 28/04/2023 13:07, Glen Fernandes wrote:
>> in boost/config/detail/suffix.hpp
>> I find this bit of code:
>> //
>> // We can't have a working std::wstreambuf if there is no std::locale:
>> //
>> # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
>> # define BOOST_NO_STD_WSTREAMBUF
>> # endif
>>
>> and believe it or not. this is now causing me some issues. Is the
>> statement above true? Do we know that wide char streams cannot exist
>> without std::locale being present? Can anyone shed light on this?
>
> Not just std::wstreambuf but also std::streambuf. ie. std::basic_streambuf
> depends on std::locale.

But does it really?

I could imagine that in some embedded platform std::locale could be
omitted (since it's huge, rarely used, insufficient for purpose, and
everyone hates it anyway), and in that implementation it could be
presumed that no such dependency exists either, so long as you don't try
to actually call the omitted methods.


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