std::is_same equivalent for unspecialised template types
问题 In one project I have found a possibility to stay DRY as a lot of code except for some small parts could stay the same for template specialisations of a template. Here is a small working example what I'm currently doing to check which templated class I'm using: template<typename T> class A{}; template<typename T> class B{}; template<template<class> class C> void do_stuff() { if(std::is_same<A<int>,C<int>>::value) { // Do Stuff for A } else if(std::is_same<B<int>,C<int>>::value) // Do Stuff