Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added explicitly defaulted constructor to error class #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 2, 2019

  1. Added explicitly defaulted constructor to error class

    Since the first template argument of `expected` can not always meet `is_nothrow_move_constructible` (e.g. `HTTPParams`), class `Error` (used with `expected`) needs to meet `is_nothrow_move_constructible` to prevent [the assignment operator of `expect` being defined as deleted](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0323r9.html#expected.object.assign). This actually fixes the build failure with updated expected-lite 0.3.0.
    Note that `Error(Error&&) = default;` could be sufficient as it would be implicit `noexcept`. The explicit `noexcept` should make the intention more explicit.
    FrankHB committed Dec 2, 2019
    Configuration menu
    Copy the full SHA
    632f536 View commit details
    Browse the repository at this point in the history