Browse Source

type traits:
* unpack_as_t -> unpack_as_type
* unpack_as_v -> unpack_as_value

Michele Caini 4 years ago
parent
commit
a069764af1
2 changed files with 4 additions and 4 deletions
  1. 2 2
      src/entt/core/type_traits.hpp
  2. 2 2
      test/entt/core/type_traits.cpp

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

@@ -78,7 +78,7 @@ inline constexpr std::size_t size_of_v = size_of<Type>::value;
  * @tparam Type A type to repeat.
  */
 template<typename Type, typename>
-using unpack_as_t = Type;
+using unpack_as_type = Type;
 
 /**
  * @brief Helper variable template to be used to _repeat_ the same value a
@@ -86,7 +86,7 @@ using unpack_as_t = Type;
  * @tparam Value A value to repeat.
  */
 template<auto Value, typename>
-inline constexpr auto unpack_as_v = Value;
+inline constexpr auto unpack_as_value = Value;
 
 /**
  * @brief Wraps a static constant.

+ 2 - 2
test/entt/core/type_traits.cpp

@@ -30,7 +30,7 @@ TEST(TypeTraits, SizeOf) {
 
 TEST(TypeTraits, UnpackAsType) {
     auto test = [](auto &&...args) {
-        return [](entt::unpack_as_t<int, decltype(args)>... value) {
+        return [](entt::unpack_as_type<int, decltype(args)>... value) {
             return (value + ... + 0);
         };
     };
@@ -40,7 +40,7 @@ TEST(TypeTraits, UnpackAsType) {
 
 TEST(TypeTraits, UnpackAsValue) {
     auto test = [](auto &&...args) {
-        return (entt::unpack_as_v<2, decltype(args)> + ... + 0);
+        return (entt::unpack_as_value<2, decltype(args)> + ... + 0);
     };
 
     ASSERT_EQ(test('c', 42., true), 6);