From b93ffe3b44c3263d809bbc5d9879f1ea75a31dc4 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 8 Aug 2019 23:42:28 +0200 Subject: [PATCH] workaround for a bug of clang (close #281) --- src/entt/core/family.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/entt/core/family.hpp b/src/entt/core/family.hpp index 6b2edbc9a..49f1ca4d5 100644 --- a/src/entt/core/family.hpp +++ b/src/entt/core/family.hpp @@ -21,7 +21,8 @@ class family { inline static ENTT_MAYBE_ATOMIC(ENTT_ID_TYPE) identifier; template - inline static const auto inner = identifier++; + // clang (since version 9) started to complain if auto is used instead of ENTT_ID_TYPE + inline static const ENTT_ID_TYPE inner = identifier++; public: /*! @brief Unsigned integer type. */ @@ -29,7 +30,7 @@ public: /*! @brief Statically generated unique identifier for the given type. */ template - // at the time I'm writing, clang crashes during compilation if auto is used in place of family_type here + // at the time I'm writing, clang crashes during compilation if auto is used instead of family_type inline static const family_type type = inner...>; };