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

Conditionally explicit etl::expected constructors that work in C++11 #719

Conversation

Vitmark97
Copy link
Contributor

Using etl::expected can be annoying below C++20 because constructors from etl::unexpected are always explicit.
Because of this it is not possible to use return etl::unexpected() in functions that return etl::expected.
This is my attempt at making the constructor conditionally explicit for C++11 and up.

@jwellbelove jwellbelove changed the base branch from master to pull-request/#719-Conditionally-explicit-etl--expected-constructors-that-work-in-C++11 June 26, 2023 15:31
@jwellbelove jwellbelove merged commit 70fd6fd into ETLCPP:pull-request/#719-Conditionally-explicit-etl--expected-constructors-that-work-in-C++11 Jun 26, 2023
58 checks passed
jwellbelove added a commit that referenced this pull request Jul 1, 2023
…constructors-that-work-in-C++11' of https://github.com/ETLCPP/etl into pull-request/#719-Conditionally-explicit-etl--expected-constructors-that-work-in-C++11
@Vitmark97 Vitmark97 deleted the expected_constructor branch July 16, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants