From 727d62727ee15f737cbea770e5095dbd7618bcc8 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 8 Jul 2026 16:43:15 +0200 Subject: [PATCH] Fix --with-latest-c++ build against libstdc++ 16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (e.g., libstdc++-devel-16.1.1-2.fc44.x86_64) after f320d95d89ecc9bea81182795969f83b05ec903c "Avoid deprecated std::filesystem::path::string", > In file included from engine/codemaker/source/netmaker/netproduce.cxx:19: > engine/codemaker/source/netmaker/csharpfile.hxx: In member function ‘std::string CSharpFile::getPath() const’: > engine/codemaker/source/netmaker/csharpfile.hxx:31:27: error: ‘const class std::filesystem::__cxx11::path’ has no member named ‘display_string’ > 31 | return m_filePath.display_string(); > | ^~~~~~~~~~~~~~ etc. Signed-off-by: Stephan Bergmann Change-Id: Ib51f9e0d0e1f902726f0d68a11fe28110388ef6a Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6554 Tested-by: Jenkins CPCI Reviewed-by: Michael Stahl (cherry picked from commit 63e9ab3b87cc5a793c8733e375dc86d99419a88d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208277 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- codemaker/source/netmaker/csharpfile.hxx | 2 +- codemaker/source/rustmaker/rustfile.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codemaker/source/netmaker/csharpfile.hxx b/codemaker/source/netmaker/csharpfile.hxx index 2085bb22983c..40bc59770e3e 100644 --- a/codemaker/source/netmaker/csharpfile.hxx +++ b/codemaker/source/netmaker/csharpfile.hxx @@ -27,7 +27,7 @@ public: public: std::string getPath() const { -#if defined __cpp_lib_format_path +#if defined __cpp_lib_format_path && __cpp_lib_format_path >= 202506L return m_filePath.display_string(); #else return m_filePath.string(); diff --git a/codemaker/source/rustmaker/rustfile.cxx b/codemaker/source/rustmaker/rustfile.cxx index 0eb0b037588f..eb9625f94575 100644 --- a/codemaker/source/rustmaker/rustfile.cxx +++ b/codemaker/source/rustmaker/rustfile.cxx @@ -25,7 +25,7 @@ RustFile::RustFile(std::string_view directory, std::string_view typeName) std::string RustFile::getPath() const { -#if defined __cpp_lib_format_path +#if defined __cpp_lib_format_path && __cpp_lib_format_path >= 202506L return m_filePath.display_string(); #else return m_filePath.string(); @@ -461,7 +461,7 @@ CppFile::CppFile(std::string_view directory, std::string_view typeName, std::str std::string CppFile::getPathString() const { -#if defined __cpp_lib_format_path +#if defined __cpp_lib_format_path && __cpp_lib_format_path >= 202506L return m_filePath.display_string(); #else return m_filePath.string();