Subject: Re: [boost] [system] Would it be possible to trial a breaking change to Boost.System and see what happens?
From: Peter Dimov (lists_at_[hidden])
Date: 2018-01-13 00:15:34
Andrey Semashev wrote:
> > 3, Make the default constructor constexpr, now possible. No code should
> > notice a difference, except less runtime code will be generated.
> Not sure there will be any difference in the generated code, since the
> constructor still has to initialize the int and the pointer.
constexpr guarantees static initialization, and therefore that no additional
code needs to run except for the initialization of the int and the pointer.
Specifically, that system_category() does not do anything else besides
returning a pointer. At present, its straightforward implementation
initializes a function-local variable, which is required to be thread-safe
and therefore requires synchronization.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk