mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-08 23:24:20 +00:00
fix: use inline instead of static for constexpr in header file (#401)
Using `static constexpr` in a header file does not seem to be correct - see [1] - and generates a bug when building the magic_enum module with GCC 15 [1] https://isocpp.org/blog/2018/05/quick-q-use-of-constexpr-in-header-file
This commit is contained in:
parent
ff6e5dd1c8
commit
a413fcc9c4
1 changed files with 2 additions and 2 deletions
|
|
@ -52,10 +52,10 @@ namespace magic_enum::containers {
|
|||
namespace detail {
|
||||
|
||||
template <typename T, typename = void>
|
||||
static constexpr bool is_transparent_v{};
|
||||
inline constexpr bool is_transparent_v{};
|
||||
|
||||
template <typename T>
|
||||
static constexpr bool is_transparent_v<T, std::void_t<typename T::is_transparent>>{true};
|
||||
inline constexpr bool is_transparent_v<T, std::void_t<typename T::is_transparent>>{true};
|
||||
|
||||
template <typename Eq = std::equal_to<>, typename T1, typename T2>
|
||||
constexpr bool equal(T1&& t1, T2&& t2, Eq&& eq = {}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue