Support Class Library
A set of tools providing classes and utility
is_instance.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <type_traits>
4 
5 namespace scl{
6  namespace tools{
7  namespace meta{
8  namespace details{
9  template <template <class, class...> class, class...>
10  struct __is_instance : std::false_type{};
11 
12  template <template <class, class...> class U, class... T>
13  struct __is_instance<U, U<T...>> : std::true_type{};
14  }
15 
22  template <template <class, class...> class U, class... T>
23  inline constexpr bool is_instance(){
24  return details::__is_instance<U, T...>::value;
25  }
26  }
27  }
28 }
Global namespace of the SCL.
Definition: alias.hpp:3
constexpr bool is_instance()
Determines whether a template type is an "instance" of a templated type.
Definition: is_instance.h:23