Re: [Boost-bugs] [Boost C++ Libraries] #5357: system::error_code::operator unspecified_bool_type() should not assume 0 == success.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5357: system::error_code::operator unspecified_bool_type() should not assume 0 == success.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-09 23:12:50


#5357: system::error_code::operator unspecified_bool_type() should not assume 0 ==
success.
-----------------------------------+----------------------------------------
  Reporter: mgruenke@… | Owner: bemandawes
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: system
   Version: Boost 1.45.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------+----------------------------------------

Comment (by mgruenke@…):

 Replying to [comment:3 viboes]:
> IIUC, you pretend that the proposed change behavior is compatible with
> the C++11 standard. I don't think this is the case.

 Pretend is a strong word. In fact, I made no statement about C++11.

 On that subject, I think Boost is Boost and the standard library is the
 standard library. I don't see why Boost can't offer more than what's
 provided by the standard library, even if it was influenced by a
 corresponding feature in Boost.


> A generic library using the current error_code behavior would break when
> instantiated with an error_category that refines the is_error behavior.

 How would it break? A given bit of code is either using a
 boost::system::error_code or a std::error_code. They're different types,
 and whichever is being used, the compiler will correctly instantiate the
 corresponding check.


> I will suggest you to post to the std-discussion ML this possible
 enhancement.

 Last I checked, this was the boost library bug tracker. If the standard
 library adopted this problematic behavior, I think that's unfortunate but
 probably too late to change.

 However, so long as there's boost::system, an option could exist for those
 cases where success does not map uniquely to 0. That's why I think this
 is worth fixing, regardless of what's in the standard library.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5357#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC