Boost logo

Boost Users :

Subject: Re: [Boost-users] Compare boost::system::error_category
From: Richard Damon (Richard_at_[hidden])
Date: 2017-03-25 12:01:02


On 3/25/17 7:12 AM, Bjorn Reese via Boost-users wrote:
> On 03/25/2017 12:32 AM, 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?
>
I think the issue is that for C++ versions prior to C++11, it isn't
guaranteed to be thread safe, as C++ had no concept of threads (which
sort of makes anything you do with threads problematical). With C++11,
if fully implemented, it should be thread safe as the standard now
requires the compiler to implement the required thread safety, the issue
is that there may be implementation that don't fully provide that as it
can be a bit expensive in some cases.

-- 
Richard Damon

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