From 2f0a08c39411f28ed44cab29ec0c1100e8d5cdd3 Mon Sep 17 00:00:00 2001 From: Michael Nosthoff Date: Wed, 14 Jan 2026 17:02:08 +0100 Subject: [PATCH 1/2] Types.h: add deduction guides for Struct from std::tuple C++23 changed the generation of implicit deduction guides. This causes the compiler to also see deduction guides for std::tuple as candidates for sdbus::Struct. Because of the competing guides the compiler doesn't know which one to pick. This seems to be implemented from gcc 15 on and is thus causing breakage there. To fix this we need to add explicit deduction guides when std::tuple is passed to sdbus::Struct. fixes https://github.com/Kistler-Group/sdbus-cpp/issues/524 --- include/sdbus-c++/Types.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sdbus-c++/Types.h b/include/sdbus-c++/Types.h index b75e3faa..00d87761 100644 --- a/include/sdbus-c++/Types.h +++ b/include/sdbus-c++/Types.h @@ -177,6 +177,12 @@ namespace sdbus { template Struct(_Elements...) -> Struct<_Elements...>; + template + Struct(const std::tuple<_Elements...>&) -> Struct...>; + + template + Struct(std::tuple<_Elements...>&&) -> Struct...>; + template constexpr Struct...> make_struct(_Elements&&... args) From f47b8d516a9137405fe1691cb8ee689c06be94ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Angelovi=C4=8D?= Date: Thu, 15 Jan 2026 12:25:42 +0100 Subject: [PATCH 2/2] refactor: remove std::decay_t wrapper We need to be able to create sdbus::Structs with element types being references. --- include/sdbus-c++/Types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sdbus-c++/Types.h b/include/sdbus-c++/Types.h index 00d87761..7b04746f 100644 --- a/include/sdbus-c++/Types.h +++ b/include/sdbus-c++/Types.h @@ -178,10 +178,10 @@ namespace sdbus { Struct(_Elements...) -> Struct<_Elements...>; template - Struct(const std::tuple<_Elements...>&) -> Struct...>; + Struct(const std::tuple<_Elements...>&) -> Struct<_Elements...>; template - Struct(std::tuple<_Elements...>&&) -> Struct...>; + Struct(std::tuple<_Elements...>&&) -> Struct<_Elements...>; template constexpr Struct...>