martinmoene / expected-dark

Expected objects for C++11 and later (and later perhaps C++98 )
MIT License
52 stars 4 forks source link

Replace default error type std::exception_ptr with std::error_code #5

Closed martinmoene closed 6 years ago

martinmoene commented 7 years ago

Per Boost.Outcome and likely std::expected.

Boost.Outcome vs std::expected (old).

rnburn commented 7 years ago

Would you be open to accepting a PR for this? Or is it still something that's being considered?

martinmoene commented 7 years ago

Thanks for your offer.

The consideration is/was to follow what comes out from std::expected.

P0323R2 (2017-06-15):

What about changing the default Error argument to error_code? Niall has suggested that std::error_code is a better default for the expected Error parameter.

Seems this has not been decided yet.

viboes commented 7 years ago

The last decision was to don't have a default :), but who know what will be in the standard version.

You can take a look at the last draft that I should send for the next meeting (wording to be polished yet).

https://github.com/viboes/std-make/blob/master/doc/proposal/expected/d0323r3.md#history

martinmoene commented 6 years ago

I'm in the process of updating expected-lite to p0323r5.

As Vicente noted, a/the default error type has disappeared from the proposal, so I'll remove it too.

For now I'll try to provide (some) backwards compatibility via -Dndel_P0323R=N, however, it's void of any guarantee.

I'll close the issue.