|
Boost Users : |
Subject: Re: [Boost-users] error_code using c++11 and boost
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2018-11-16 20:33:30
On Fri, Nov 16, 2018 at 7:12 AM Lars via Boost-users <
boost-users_at_[hidden]> wrote:
> A project that uses Boost 1.6X (filesystem, uuid, asio) and C++14 on
multiplatform.
>
> Does it make sense to use std::error_code in this project ? The concern
is compatibility between boost and std. The filesystem_error exception will
return a boost ::system::error_code which is not compatible with
std::error_code as far as I can tell. Exception is not an option.
>
> Would it be possible for boost to implement some sort of convertion
method from boost::system::error_code to std::errror_code?
You could use LEAF to avoid having to translate between std::error_code and
boost::error_code in the first place. See
https://zajo.github.io/leaf/#technique_disparate_error_types.
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