#include <iostream>
#include <list>
#include <vector>
using std::list;
#include <map>
template <typename T>
using vector = std::vector<T>;
#define DEF_IS(check_type, return_type) \
template<class T> \
typename std::enable_if<std::is_same<T, check_type>::value, return_type>::type
#define CHECK_IS_1(check_type) \
template<typename T> struct is_##check_type : public std::false_type {}; \
template<typename T> \
struct is_##check_type<check_type<T>> : public std::true_type {};
CHECK_IS_1(vector);
#define DEF_IS_1(check_type, return_type) \
template<class T> \
typename std::enable_if<is_##check_type<T>::value, return_type>::type
template <typename T, typename V>
using map = std::map<T,V>;
#define CHECK_IS_2(check_type) \
template<typename T> struct is_##check_type : public std::false_type {}; \
template<typename T, typename V> \
struct is_##check_type<check_type<T,V>> : public std::true_type {};
CHECK_IS_2(map)
#define DEF_IS_2(check_type, return_type) \
template<class T> \
typename std::enable_if<is_##check_type<T>::value, return_type>::type
DEF_IS(bool , std::string) check_func0(){
return "12";
}
DEF_IS_1(vector, bool) check_func1(std::string value) {
return true;
}
DEF_IS_2(map, bool) check_func2(std::string value) {
return true;
}
int main() {
std::string value0 = check_func0<bool>();
bool value = check_func1<vector<int>>("hello");
bool value2 = check_func2<map<int, int>>("hello");
return 0;
}