#include <iostream>
#include <string>
#include <type_traits>

//ひとつのメタ関数を受け取る
template <template <typename> class Ty>
struct condition	{
	template <typename T>
	using apply = Ty<T>;
};

template<template<typename T, typename U> class aaa, typename bind1st_type>
struct binder
{
	template<typename T>
	using type = aaa<bind1st_type, T>;
};

struct string2 : std::string {};

int main()
{
	using condition1 = condition<std::is_pointer>;
	std::cout << condition1::apply<int>::value << std::endl;
	std::cout << condition1::apply<int*>::value << std::endl;
	
	using condition2 = condition<binder<std::is_base_of, std::string>::type>;
	std::cout << condition2::apply<int>::value << std::endl;
	std::cout << condition2::apply<string2>::value << std::endl;
}
