瀏覽代碼

test: more consteval-ness

skypjack 2 月之前
父節點
當前提交
ad9ef0320b
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      test/entt/core/type_info.cpp
  2. 1 1
      test/lib/meta/plugin_std/userdata.h

+ 1 - 1
test/entt/core/type_info.cpp

@@ -7,7 +7,7 @@
 
 template<>
 struct entt::type_name<float> final {
-    [[nodiscard]] static constexpr std::string_view value() noexcept {
+    [[nodiscard]] static consteval std::string_view value() noexcept {
         return std::string_view{""};
     }
 };

+ 1 - 1
test/lib/meta/plugin_std/userdata.h

@@ -12,7 +12,7 @@
 #define ASSIGN_TYPE_ID(clazz) \
     template<> \
     struct entt::type_hash<clazz> { \
-        static constexpr entt::id_type value() noexcept { \
+        static consteval entt::id_type value() noexcept { \
             return entt::basic_hashed_string<std::remove_const_t<std::remove_pointer_t<std::decay_t<decltype(#clazz)>>>>{#clazz}; \
         } \
     }