Skip to content

Commit

Permalink
Fix to use forwarding reference (thanks @matthew-wozniczka, fixes #74)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed May 4, 2023
1 parent 0723abd commit 364f93f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/nonstd/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ class optional
void initialize( V && value )
{
assert( ! has_value() );
contained.construct_value( std::move( value ) );
contained.construct_value( std::forward<V>( value ) );
has_value_ = true;
}

Expand Down

0 comments on commit 364f93f

Please sign in to comment.