#include <iostream> #include <typeinfo> using namespace std; int sums() { return 0; } template <typename Type, typename... T> int sums(const Type s, const T... args) { int res = 0; if (typeid(s) == typeid(int)) { res += s; } else { cout << "not int" << s << endl; } res += sums(args...); return res; } int main() { cout << sums(1,"sir", 4) << endl; return 0; }
union
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)