Преглед изворни кода

type_info: const correctness

Michele Caini пре 1 година
родитељ
комит
6d03a44246
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/entt/core/type_info.hpp

+ 1 - 1
src/entt/core/type_info.hpp

@@ -250,7 +250,7 @@ private:
 template<typename Type>
 [[nodiscard]] const type_info &type_id() noexcept {
     if constexpr(std::is_same_v<Type, std::remove_cv_t<std::remove_reference_t<Type>>>) {
-        static type_info instance{std::in_place_type<Type>};
+        static const type_info instance{std::in_place_type<Type>};
         return instance;
     } else {
         return type_id<std::remove_cv_t<std::remove_reference_t<Type>>>();