Skip to content

Commit

Permalink
use official sol fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedLongJohns committed Dec 19, 2024
1 parent 14e3436 commit 4b3e753
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sol/sol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6756,8 +6756,8 @@ namespace sol {
static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args");

*this = nullopt;
m_value = &T( std::forward<Args>( args )... );
return *m_value;
new (static_cast<void*>(this)) optional(std::in_place, std::forward<Args>(args)...);
return **this;
}

/// Swaps this optional with the other.
Expand Down

0 comments on commit 4b3e753

Please sign in to comment.