mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix optional converting constructor
This commit is contained in:
parent
5aa4cf8cbe
commit
d75283355c
2 changed files with 36 additions and 1 deletions
|
@ -58,7 +58,7 @@ namespace sprout {
|
|||
template<typename U>
|
||||
explicit SPROUT_CONSTEXPR optional(optional<U> const& v)
|
||||
: init(v.is_initialized())
|
||||
, val(v.get())
|
||||
, val(v.is_initialized() ? v.get() : holder_type())
|
||||
{}
|
||||
|
||||
optional& operator=(sprout::nullopt_t v) SPROUT_NOEXCEPT {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue