meta: treat T(*)[N] as non-pointer-like types

This commit is contained in:
Michele Caini
2021-04-12 15:43:04 +02:00
parent 77f80cecf9
commit e98d8426bb
2 changed files with 11 additions and 9 deletions

View File

@@ -20,6 +20,17 @@ struct is_meta_pointer_like<Type *>
{};
/**
* @brief Partial specialization used to reject pointers to arrays.
* @tparam Type Type of elements of the array.
* @tparam N Number of elements of the array.
*/
template<typename Type, std::size_t N>
struct is_meta_pointer_like<Type(*)[N]>
: std::false_type
{};
/**
* @brief Makes `std::shared_ptr`s of any type pointer-like types for the meta
* system.

View File

@@ -65,15 +65,6 @@ template<typename>
struct is_meta_pointer_like: std::false_type {};
/**
* @brief Partial specialization to ensure that arrays aren't accepted.
* @tparam Type Type of elements of the array.
* @tparam N Number of elements of the array.
*/
template<typename Type, std::size_t N>
struct is_meta_pointer_like<Type[N]>: std::false_type {};
/**
* @brief Partial specialization to ensure that const pointer-like types are
* also accepted.