최근에 C#으로 코딩좀 하고 있는데…

역시 c++의 강력한 template이 그립다..

개인적으로 OOP형태의 언어에서는 c++의 template 때문에 c++을 버릴 수 없을 것 같다. ㅠ

필요할 것 같아서 작성했는데…

std::is_arithmetic 은 integral type(short, int, __int64 …) 이나 floating-point type(float, double) 이면 true이다.

이걸 tuple의 모든 항목이 true인지 검사하는 템플릿 클래스를 만들어 보았다.

참고로, std::is_arithmetic< std::tuple<…> >::value = false 이다.

응용하면 std::is_integral, std::is_floating_point, std::is_same 등도 만들 수 있다.

VS2015기준으로 작성되어있다.