1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

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.
This commit is contained in:
Phillip Stephens 2025-08-31 14:20:43 -07:00 committed by GitHub
parent aaf57737d5
commit 24853ff6d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -203,7 +203,7 @@ struct adl_info_holder {
constexpr static adl_info_holder<IsFlags,Min,Max,prefix_len> prefix() { return {};} constexpr static adl_info_holder<IsFlags,Min,Max,prefix_len> prefix() { return {};}
}; };
adl_info_holder<> adl_info() static inline adl_info_holder<> adl_info()
{ {
return {}; return {};
} }