ned14 / outcome

Provides very lightweight outcome<T> and result<T> (non-Boost edition)
https://ned14.github.io/outcome
Other
676 stars 62 forks source link

C++20-style concepts compatibility #211

Closed niekbouman closed 4 years ago

niekbouman commented 4 years ago

Dear Niall,

When using the <boost/outcome.hpp> header with gcc (trunk) in -std=c++20 mode, I get concepts-related errors from convert.hpp:

convert.hpp:54:7: error: return-type-requirement is not a type-constraint 54 | ->bool;

convert.hpp:66:7: error: return-type-requirement is not a type-constraint 66 | ->bool;

I guess that the fix is to write

-> same_as<bool>

in the requires expression. (Instead of ->bool)

See also a related bugfix in cmcstl2: https://github.com/CaseyCarter/cmcstl2/commit/4f5026603540dc1e14294151d6d3939a6288d712

Kind regards, Niek

ned14 commented 4 years ago

Fixed! Many thanks for this report in particular, I never would have seen this before the Boost 1.72 release otherwise.