Kaynağa Gözat

multiple modules: minor changes

Michele Caini 6 yıl önce
ebeveyn
işleme
819cd623f9

+ 3 - 3
src/entt/core/type_traits.hpp

@@ -44,7 +44,7 @@ struct choice_t<0> {};
  * @tparam N Number of choices available.
  */
 template<std::size_t N>
-constexpr choice_t<N> choice{};
+inline constexpr choice_t<N> choice{};
 
 
 /*! @brief A class to use to push around lists of types, nothing more. */
@@ -72,7 +72,7 @@ struct type_list_size<type_list<Type...>>
  * @tparam List Type list.
  */
 template<class List>
-constexpr auto type_list_size_v = type_list_size<List>::value;
+inline constexpr auto type_list_size_v = type_list_size<List>::value;
 
 
 /*! @brief Primary template isn't defined on purpose. */
@@ -176,7 +176,7 @@ struct is_equality_comparable<Type, std::void_t<decltype(std::declval<Type>() ==
  * @tparam Type Potentially equality comparable type.
  */
 template<class Type>
-constexpr auto is_equality_comparable_v = is_equality_comparable<Type>::value;
+inline constexpr auto is_equality_comparable_v = is_equality_comparable<Type>::value;
 
 
 /**

+ 1 - 1
src/entt/entity/entity.hpp

@@ -171,7 +171,7 @@ ENTT_OPAQUE_TYPE(entity, id_type);
  * any allowed type. Similarly, there exist comparision operators between the
  * null entity and any other entity identifier.
  */
-constexpr auto null = internal::null{};
+inline constexpr auto null = internal::null{};
 
 
 }

+ 1 - 1
src/entt/entity/observer.hpp

@@ -115,7 +115,7 @@ struct basic_collector<matcher<type_list<Reject...>, type_list<Require...>, Rule
 
 
 /*! @brief Variable template used to ease the definition of collectors. */
-constexpr basic_collector<> collector{};
+inline constexpr basic_collector<> collector{};
 
 
 /**

+ 2 - 2
src/entt/entity/utility.hpp

@@ -21,7 +21,7 @@ struct exclude_t: type_list<Type...> {};
  * @tparam Type List of types.
  */
 template<typename... Type>
-constexpr exclude_t<Type...> exclude{};
+inline constexpr exclude_t<Type...> exclude{};
 
 
 /**
@@ -37,7 +37,7 @@ struct get_t: type_list<Type...>{};
  * @tparam Type List of types.
  */
 template<typename... Type>
-constexpr get_t<Type...> get{};
+inline constexpr get_t<Type...> get{};
 
 
 }

+ 1 - 1
src/entt/meta/policy.hpp

@@ -10,7 +10,7 @@ struct as_alias_t {};
 
 
 /*! @brief Disambiguation tag. */
-constexpr as_alias_t as_alias;
+inline constexpr as_alias_t as_alias;
 
 
 /*! @brief Empty class type used to request the _as-is_ policy. */

+ 1 - 1
src/entt/signal/delegate.hpp

@@ -68,7 +68,7 @@ struct connect_arg_t {};
 
 /*! @brief Constant of type connect_arg_t used to disambiguate calls. */
 template<auto Func>
-constexpr connect_arg_t<Func> connect_arg{};
+inline constexpr connect_arg_t<Func> connect_arg{};
 
 
 /**