mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Lift upstream sol::optional::emplace Clang 19 build fix
This commit is contained in:
parent
e5ad1cd214
commit
ced142da92
2 changed files with 4 additions and 1 deletions
2
extern/sol3/README.md
vendored
2
extern/sol3/README.md
vendored
|
@ -1,3 +1,5 @@
|
||||||
The code in this directory is copied from https://github.com/ThePhD/sol2.git (64096348465b980e2f1d0e5ba9cbeea8782e8f27)
|
The code in this directory is copied from https://github.com/ThePhD/sol2.git (64096348465b980e2f1d0e5ba9cbeea8782e8f27)
|
||||||
|
|
||||||
|
Additional changes include cherry-picking upstream commit d805d027e0a0a7222e936926139f06e23828ce9f to fix compilation under Clang 19.
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
|
|
3
extern/sol3/sol/optional_implementation.hpp
vendored
3
extern/sol3/sol/optional_implementation.hpp
vendored
|
@ -2191,7 +2191,8 @@ namespace sol {
|
||||||
static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args");
|
static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args");
|
||||||
|
|
||||||
*this = nullopt;
|
*this = nullopt;
|
||||||
this->construct(std::forward<Args>(args)...);
|
new (static_cast<void*>(this)) optional(std::in_place, std::forward<Args>(args)...);
|
||||||
|
return **this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Swaps this optional with the other.
|
/// Swaps this optional with the other.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue