Created
October 30, 2017 15:24
-
-
Save xaxxon/dfb14a1764a1c951392344603c066342 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<template<class...> class tmpl, typename T> | |
struct _is_template_for : public std::false_type {}; | |
template<template<class...> class tmpl, class... Args> | |
struct _is_template_for<tmpl, tmpl<Args...>> : public std::true_type {}; | |
template<template<class...> class tmpl, typename... Ts> | |
struct is_template_for : public std::conjunction<_is_template_for<tmpl, std::decay_t<Ts>>...> {}; | |
template<template<class...> class tmpl, typename... Ts> | |
constexpr bool is_template_for_v = is_template_for<tmpl, Ts...>::value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment