Fixed a few things

This commit is contained in:
2025-11-06 01:06:46 +01:00
parent e116e0249d
commit 89a5ae1304
8 changed files with 16 additions and 11 deletions

View File

@@ -6752,7 +6752,7 @@ namespace sol {
static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args");
*this = nullopt;
this->construct(std::forward<Args>(args)...);
new (static_cast<void*>(this)) optional(std::in_place, std::forward<Args>(args)...);
}
/// Swaps this optional with the other.