From c3ef1ea142e8336b4ceb58e853467b6258a81920 Mon Sep 17 00:00:00 2001 From: Charles Villard <charles.villard@cea.fr> Date: Thu, 17 Oct 2024 11:18:44 +0200 Subject: [PATCH] fix: fmt: fix fmt --- CMakeLists.txt | 3 ++- include/aidge/data/Elts.hpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index beec9fbb4..61f021477 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,7 +117,8 @@ if (PYBIND) ## endif() -target_link_libraries(${module_name} PUBLIC Threads::Threads fmt::fmt) +target_link_libraries(${module_name} PRIVATE fmt::fmt) +target_link_libraries(${module_name} PUBLIC Threads::Threads) target_compile_features(${module_name} PRIVATE cxx_std_14) if (DOSANITIZE STREQUAL "ON") diff --git a/include/aidge/data/Elts.hpp b/include/aidge/data/Elts.hpp index 1a5a9e10e..bc4a225fc 100644 --- a/include/aidge/data/Elts.hpp +++ b/include/aidge/data/Elts.hpp @@ -101,12 +101,12 @@ private: template<> struct fmt::formatter<Aidge::Elts_t> { template<typename ParseContext> - inline constexpr auto parse(ParseContext& ctx) { + inline constexpr auto parse(ParseContext& ctx) -> decltype(ctx.begin()) { return ctx.begin(); } template<typename FormatContext> - inline auto format(Aidge::Elts_t const& elt, FormatContext& ctx) { + inline auto format(const Aidge::Elts_t& elt, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}:{}", elt.data, elt.token); } }; -- GitLab