Skip to content

Conversation

fekir
Copy link
Contributor

@fekir fekir commented Sep 16, 2021

The current implementation required ad least a move-constructor for
in-place construction.
This made it impossible to directly, create an optional of a type
without copy and move operators.

A workaround is using the variadic emplace function, but it requires to
construct the object in two steps.

std::optional does not require any copy or move operation for in-place
construction

The current implementation required ad least a move-constructor for
in-place construction.
This made it impossible to directly, create an optional of a type
without copy and move operators.

A workaround is using the variadic emplace function, but it requires to
construct the object in two steps.

std::optional does not require any copy or move operation for in-place
construction
@martinmoene
Copy link
Owner

Thanks for your contribution.

I'll tend to CASE( "make_optional: Allows to in-place copy-construct optional from arguments (C++11)" ) that appears similar to the test you did update.

martinmoene pushed a commit that referenced this pull request Sep 16, 2021
The current implementation required ad least a move-constructor for
in-place construction.
This made it impossible to directly, create an optional of a type
without copy and move operators.

A workaround is using the variadic emplace function, but it requires to
construct the object in two steps.

std::optional does not require any copy or move operation for in-place
construction
martinmoene added a commit that referenced this pull request Sep 16, 2021
@martinmoene
Copy link
Owner

Think all is taken care of now and the PR can be closed now.

@fekir
Copy link
Contributor Author

fekir commented Sep 18, 2021

thank you @martinmoene

can I ask if there are any plans for a new release?

@martinmoene
Copy link
Owner

@fekir A new release seems in order. Will address that in the coming days.

@martinmoene
Copy link
Owner

Released optional lite version 3.5.0.

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