Boost logo

Boost :

Subject: Re: [boost] [system] The new Boost.System is now ready
From: Bjorn Reese (breese_at_[hidden])
Date: 2018-10-07 11:20:31


On 10/05/18 00:37, Peter Dimov via Boost wrote:

>> - identifier-based category comparison
>
> https://pdimov.github.io/cpp-papers/P1196R0.html

This states in Motivation that

  "relying on address-based comparisons makes it impossible to declare
   category objects constexpr and makes it impossible to declare
   operator< constexpr"

Implementation adds the constexpr to operator<

   "constexpr bool operator<(const error_category& rhs) const noexcept;"

with an as-if comment about the return value, which ends with an address
comparison:

   "return less<const error_category*>()(this, &rhs);"

How can this be made constexpr?

>> - message() into a caller-supplied buffer
>
> https://pdimov.github.io/cpp-papers/P1197R0.html

This document refers to strerror_r as a glibc thing. It is also Posix,
which is probably a better reference:

   http://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html

Other than that, I very much agree with your proposals.


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