Boost logo

Boost :

Subject: Re: [boost] Reforming Boost.System and <system_error> round 2
From: Peter Dimov (lists_at_[hidden])
Date: 2018-01-16 17:18:19


> It can still be worth it because it's more likely to occur in a context
> where the compiler can see what category is being used. When you have
>
> error_code ec( r, system_category() );
>
> and system_category() is constexpr, the compiler knows with certainty what
> the call category().failed( r ) will do, so it will replace it with r !=
> 0.

See f.ex. https://godbolt.org/g/6wGjCu


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