Skip to content

Commit

Permalink
DPL: make base_of_template/specialization_of_template accept cr-q…
Browse files Browse the repository at this point in the history
…ualified types (#13872)
  • Loading branch information
aalkin authored Jan 21, 2025
1 parent 4d5a07f commit 9c5dea2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Framework/Foundation/include/Framework/Traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ inline constexpr bool is_specialization_v = is_specialization<T, Ref>::value;
template <template <typename...> typename T, typename S>
concept specialization_of_template = requires {
{
[]<typename... Ts>(T<Ts...>*) -> T<Ts...> {}(std::declval<S*>())
} -> std::same_as<S>;
[]<typename... Ts>(T<Ts...>*) -> T<Ts...> {}(std::declval<std::decay_t<S>*>())
} -> std::same_as<std::decay_t<S>>;
};

template <typename A, typename B>
Expand All @@ -51,7 +51,7 @@ inline constexpr bool always_static_assert_v = always_static_assert<T...>::value

template <template <typename...> typename B, typename D>
concept base_of_template = requires {
[]<typename... Ts>(B<Ts...>*) {}(std::declval<D*>());
[]<typename... Ts>(B<Ts...>*) {}(std::declval<std::decay_t<D>*>());
};

template <template <typename...> typename B, typename D>
Expand Down

0 comments on commit 9c5dea2

Please sign in to comment.