mirror of
https://github.com/azahar-emu/dynarmic
synced 2025-11-07 07:29:59 +01:00
git-subtree-dir: externals/mp git-subtree-split: 29cb5588da3a18ed571a0e41622900a01b9f01eb
24 lines
635 B
C++
24 lines
635 B
C++
/* This file is part of the mp project.
|
|
* Copyright (c) 2020 MerryMage
|
|
* SPDX-License-Identifier: 0BSD
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <type_traits>
|
|
|
|
namespace mp {
|
|
|
|
/// Is type T an instance of template class C?
|
|
template <template <class...> class, class>
|
|
struct is_instance_of_template : public std::false_type {};
|
|
|
|
template <template <class...> class C, class... As>
|
|
struct is_instance_of_template<C, C<As...>> : public std::true_type {};
|
|
|
|
/// Is type T an instance of template class C?
|
|
template<template <class...> class C, class T>
|
|
constexpr bool is_instance_of_template_v = is_instance_of_template<C, T>::value;
|
|
|
|
} // namespace mp
|