From 24853ff6d654db59d45b74162dfb5c58558dcc96 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 31 Aug 2025 14:20:43 -0700 Subject: [PATCH] Prevent multiple definitions of adl_info As currently implemented, `adl_info` can potentially be defined wherever `magic_enum.hpp` is included, this can lead to linker errors downstream. Making the function static-inline prevents this from happening. --- include/magic_enum/magic_enum.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/magic_enum/magic_enum.hpp b/include/magic_enum/magic_enum.hpp index 3ffc16f..16fd2b3 100644 --- a/include/magic_enum/magic_enum.hpp +++ b/include/magic_enum/magic_enum.hpp @@ -203,7 +203,7 @@ struct adl_info_holder { constexpr static adl_info_holder prefix() { return {};} }; -adl_info_holder<> adl_info() +static inline adl_info_holder<> adl_info() { return {}; }