Fix build with llvm-19. Cherry-picked from
https://github.com/Project-OSRM/osrm-backend/pull/7098

Index: third_party/sol2/include/sol/sol.hpp
--- third_party/sol2/include/sol/sol.hpp.orig
+++ third_party/sol2/include/sol/sol.hpp
@@ -6752,7 +6752,8 @@ 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)...);
+			return **this;
 		}
 
 		/// Swaps this optional with the other.
