0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd::util: Add is_specialization_of template utility.

This commit is contained in:
Jason Volk 2017-12-13 14:32:05 -07:00
parent dfd23fac4c
commit e7036fa79f

View file

@ -504,14 +504,32 @@ template<class T,
class = void>
struct is_complete
:std::false_type
{
};
{};
template<class T>
struct is_complete<T, decltype(void(sizeof(T)))>
:std::true_type
{
};
{};
//
// Test if type is a specialization of a template
//
template<class,
template<class...>
class>
struct is_specialization_of
:std::false_type
{};
template<template<class...>
class T,
class... args>
struct is_specialization_of<T<args...>, T>
:std::true_type
{};
//