mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-04 21:55:06 +01:00
Squashed 'externals/mp/' content from commit 29cb5588d
git-subtree-dir: externals/mp git-subtree-split: 29cb5588da3a18ed571a0e41622900a01b9f01eb
This commit is contained in:
commit
7b0c47d3f0
30 changed files with 971 additions and 0 deletions
23
include/mp/traits/is_instance_of_template.h
Normal file
23
include/mp/traits/is_instance_of_template.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue