Subject: Re: [boost] Reforming Boost.System and <system_error> round 2
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-01-16 15:25:18
On 01/16/2018 08:08 AM, charleyb123 . via Boost wrote:
> This is interesting: There's a long-recognized need for instance-specific
> error parameter-values (e.g., a "key-value-map" for parameters, such as to
> include the `file-name` that we we failed to open). This seems to be the
> "number-one" reason to create user-specific wrappers around
> So, adding an 'std::unique_ptr<>` member to `std::error_code` would allow
> that; and could also solve the memory-transport issue to remove
> `std::string` from the `std::error_code` interface.
unique_ptr would make error code move-only,
which seems like too much of a breaking change.
Also, it sounds like you're trying to re-invent
Boost.Exception for error_code--why exactly are
we avoiding exceptions, again?
> Recall that currently (on *all* platforms that I'm aware of),
> `sizeof(std::error_code) == sizeof(int)+sizeof(void*)`.
> ...so, this idea would add `sizeof(unique_ptr<>)` to `std::error_code`.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk