#include <memory>
#include <iostream>


template <typename V, typename W>
struct foobar
{	static const int value = 0; };

template <typename V>
struct foobar<V, typename std::conditional<1==sizeof(V), std::true_type, std::false_type>::type>
{	static const int value = 1; };

template <typename V>
struct foobar<V, typename std::conditional<4==sizeof(V), std::true_type, std::false_type>::type>
{	static const int value = 4; };

int main()
{
	int result = 0;
	result = foobar<char, std::true_type>::value;
	result = foobar<short, std::true_type>::value;
	result = foobar<int, std::true_type>::value;
	std::cout << "char : " << foobar<char, std::true_type>::value << std::endl;
	std::cout << "short : " << foobar<short, std::true_type>::value << std::endl;
	std::cout << "int : " << foobar<int, std::true_type>::value << std::endl;
	return 0;
}
