#include <iostream>class Test{ public: template<typename T> static void print(T arg) { std::cout<<arg; } template<typename... T, typename curT> static void print(curT curArg, T... args) { std::cout<<curArg<<std::endl; print(args...); }};#define _print(arg1,...) (Test::print(arg1))int main(int argc, char* argv[]){ Test::print(1.2,"sdfsdf",3,4); _print(1.2,"sdfsdf",3,4); return 0;}
#define _print(arg1,...) (Test::print(arg1,...))
#define _print(arg1,...) (Test::print(arg1...))
#define _print(...) (Test::print(__VA_ARGS__))
template<typename... T, typename curT> static void print(curT curArg, T... args)
void (Test::*pt2Member)(void*,...);
Test::print(1.2,"sdfsdf",3,4); _print(1.2,"sdfsdf",3,4);}
C++ (Qt)#if DEBUG_PRINT #define PRINT printf // нужна печать#else #define PRINT // не нужна#endif // использованиеPRINT("%f, %s, %d, %d", 1.2, "sdfsdf", 3, 4);