diff --git a/Makefile b/Makefile index 6053544900f8..123953460f49 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CMAKE_COMMON_FLAGS ?= -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -CMAKE_DEBUG_FLAGS ?= -DUSERVER_SANITIZE=addr;ub +CMAKE_DEBUG_FLAGS ?= '-DUSERVER_SANITIZE=addr;ub' CMAKE_RELEASE_FLAGS ?= KERNEL := $(shell uname -s) NPROCS ?= $(shell nproc) diff --git a/core/src/components/impl/component_name_from_info.hpp b/core/src/components/impl/component_name_from_info.hpp index 37a4d45c743f..abc2421760f5 100644 --- a/core/src/components/impl/component_name_from_info.hpp +++ b/core/src/components/impl/component_name_from_info.hpp @@ -31,3 +31,17 @@ struct std::hash { return std::hash{}(v.StringViewName()); } }; + +// fmt::format support +template <> +struct fmt::formatter< + USERVER_NAMESPACE::components::impl::ComponentNameFromInfo, char> + : fmt::formatter { + template + auto format( + const USERVER_NAMESPACE::components::impl::ComponentNameFromInfo& v, + FormatContext& ctx) USERVER_FMT_CONST { + return fmt::formatter{}.format(v.StringViewName(), + ctx); + } +};