From b7b2afa8e70f3800d0b1cbff03ba1aa206c90b7f Mon Sep 17 00:00:00 2001 From: Alexander Farber Date: Sun, 12 Jan 2025 20:59:12 +0100 Subject: [PATCH] - Update to Alpine Linux 3.21.2 - Fix no member named 'construct' in 'optional' error in sol.hpp with Clang 19 - Fix Policy CMP0167 is not set: The FindBoost module is removed with cmake 3.31.1 --- CMakeLists.txt | 3 +++ docker/Dockerfile-alpine | 2 +- third_party/sol2/include/sol/sol.hpp | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08e0a64fa..a8388b7db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,9 @@ endif() if (POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() +if (POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif() project(OSRM C CXX) diff --git a/docker/Dockerfile-alpine b/docker/Dockerfile-alpine index f6b14c21c..9c4438307 100644 --- a/docker/Dockerfile-alpine +++ b/docker/Dockerfile-alpine @@ -1,4 +1,4 @@ -FROM alpine:3.20.5 AS alpine-mimalloc +FROM alpine:3.21.2 AS alpine-mimalloc RUN apk add --no-cache mimalloc diff --git a/third_party/sol2/include/sol/sol.hpp b/third_party/sol2/include/sol/sol.hpp index d7da763f7..f91d4468c 100644 --- a/third_party/sol2/include/sol/sol.hpp +++ b/third_party/sol2/include/sol/sol.hpp @@ -6752,7 +6752,8 @@ namespace sol { static_assert(std::is_constructible::value, "T must be constructible with Args"); *this = nullopt; - this->construct(std::forward(args)...); + new (static_cast(this)) optional(std::in_place, std::forward(args)...); + return **this; } /// Swaps this optional with the other.