From 11df6ec927f4935eae08fab5c8d020eed21acbd1 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Wed, 22 Sep 2021 16:37:33 +0200 Subject: [PATCH] type_id: cannot have a static variable in a constexpr function (right msvc?) --- src/entt/core/type_info.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entt/core/type_info.hpp b/src/entt/core/type_info.hpp index 3b22eedbd..029a973f9 100644 --- a/src/entt/core/type_info.hpp +++ b/src/entt/core/type_info.hpp @@ -140,7 +140,7 @@ struct type_name final { /*! @brief Implementation specific information about a type. */ class type_info final { template - friend constexpr const type_info &type_id() ENTT_NOEXCEPT; + friend const type_info &type_id() ENTT_NOEXCEPT; template constexpr type_info(std::in_place_type_t) ENTT_NOEXCEPT @@ -253,7 +253,7 @@ private: * @return A properly initialized type info object. */ template -[[nodiscard]] constexpr const type_info &type_id() ENTT_NOEXCEPT { +[[nodiscard]] const type_info &type_id() ENTT_NOEXCEPT { static type_info instance{std::in_place_type>>}; return instance; }