traits: add is_same_template_template trait
This commit is contained in:
parent
cbe439b8e9
commit
5228cecbfb
@ -352,4 +352,35 @@ struct inner_type<
|
||||
template <typename ValueT>
|
||||
using inner_type_t = typename inner_type<ValueT>::type;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <
|
||||
template <typename...> class TemplateT,
|
||||
typename QueryT
|
||||
>
|
||||
struct is_same_template_template : public std::false_type {};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <
|
||||
template <typename...> class TemplateT,
|
||||
template <typename...> class QueryT,
|
||||
typename ...Args
|
||||
> struct is_same_template_template<
|
||||
TemplateT,
|
||||
QueryT<Args...>
|
||||
> : public std::conditional_t<
|
||||
std::is_same_v<
|
||||
TemplateT<Args...>,
|
||||
QueryT<Args...>
|
||||
>,
|
||||
std::true_type,
|
||||
std::false_type
|
||||
> { };
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <template <typename...> class TemplateT, typename QueryT>
|
||||
constexpr auto is_same_template_template_v = is_same_template_template<TemplateT,QueryT>::value;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user