Boost logo

Boost Users :

Subject: Re: [Boost-users] Compare boost::system::error_category
From: Bjorn Reese (breese_at_[hidden])
Date: 2017-03-25 15:03:08


On 03/25/2017 01:45 PM, Niall Douglas via Boost-users wrote:
>>> Boost's quality of implementation is the same as libstdc++ or libc++,
>>> you can get multiple instantiations in certain circumstances and those
>>> can have differing addresses.
>>
>> The various error categories are implemented (for header-only libraries)
>> as inlined Meyer singletons. Does that mean that we have a general
>> problem with such singletons?
>
> The short answer is yes, the error category comparison operators are
> unreliable on all major STLs apart from Dinkumware's and in Boost.

Can you elaborate on what the core problem is?

You have mentioned both memory barriers and RTLD_LOCAL which seem to
imply different problems (concurrency versus relocation of weak
symbols.)

Please notice that I am interested in singletons in general, not only
error categories.


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