How do I compile variadic templates conditionally?

Posted by FredOverflow on Stack Overflow See other posts from Stack Overflow or by FredOverflow
Published on 2010-06-01T17:10:22Z Indexed on 2010/06/01 17:13 UTC
Read the original article Hit count: 207

Filed under:
|
|
|

Is there a macro that tells me whether or not my compiler supports variadic templates?

#ifdef VARIADIC_TEMPLATES_AVAILABLE

template<typename... Args> void coolstuff(Args&&... args);

#else

???

#endif

If they are not supported, I guess I would simulate them with a bunch of overloads. Any better ideas? Maybe there are preprocessor libraries that can ease the job?

© Stack Overflow or respective owner

Related posts about c++

Related posts about templates