From 69ecdeba71078849c0986f3214b4a6d20b7f73ab Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 14 Oct 2025 20:27:26 +0200 Subject: [PATCH] FIX: Fix missing std::optional declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /run/build/BambuStudio/src/slic3r/GUI/DeviceCore/DevFilaAmsSetting.h:16:10: error: ‘optional’ in namespace ‘std’ does not name a template type 16 | std::optional IsDetectOnInsertEnabled() const { return m_enable_detect_on_insert; }; | ^~~~~~~~ /run/build/BambuStudio/src/slic3r/GUI/DeviceCore/DevFilaAmsSetting.h:4:1: note: ‘std::optional’ is defined in header ‘’; this is probably fixable by adding ‘#include ’ 3 | #include "DevCtrl.h" +++ |+#include 4 | /run/build/BambuStudio/src/slic3r/GUI/DeviceCore/DevFilaSystem.h:174:10: error: ‘optional’ in namespace ‘std’ does not name a template type 174 | std::optional IsDetectOnInsertEnabled() const { return m_ams_system_setting.IsDetectOnInsertEnabled(); }; | ^~~~~~~~ /run/build/BambuStudio/src/slic3r/GUI/DeviceCore/DevFilaSystem.h:13:1: note: ‘std::optional’ is defined in header ‘’; this is probably fixable by adding ‘#include ’ 12 | #include +++ |+#include 13 | (cherry picked from commit fa482b1c0dc7faa2ad87c37eb7f1ea2ce87a5084) --- src/slic3r/GUI/DeviceCore/DevFilaAmsSetting.h | 1 + src/slic3r/GUI/DeviceCore/DevFilaSystem.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/slic3r/GUI/DeviceCore/DevFilaAmsSetting.h b/src/slic3r/GUI/DeviceCore/DevFilaAmsSetting.h index dbc57773fa..5cecbd5507 100644 --- a/src/slic3r/GUI/DeviceCore/DevFilaAmsSetting.h +++ b/src/slic3r/GUI/DeviceCore/DevFilaAmsSetting.h @@ -1,4 +1,5 @@ #pragma once +#include #include #include "DevCtrl.h" diff --git a/src/slic3r/GUI/DeviceCore/DevFilaSystem.h b/src/slic3r/GUI/DeviceCore/DevFilaSystem.h index 910eaf1558..f6c1a2d420 100644 --- a/src/slic3r/GUI/DeviceCore/DevFilaSystem.h +++ b/src/slic3r/GUI/DeviceCore/DevFilaSystem.h @@ -7,6 +7,7 @@ #include "DevUtil.h" #include +#include #include #include #include