Is it possible to do something along the lines of:
type t = int;//this would be a function which identifies what type the next argument is
if( t == int )
printf( "%d", va_arg( theva_list, t ) );
in a relatively trivial way? The only object I know which can hold a type is type_info and I can't work out how to use it in this way.
Thanks, Patrick
Generally speaking, no. Types can only really be stored, manipulated, etc., at compile time. If you want something at run time, you have to convert (usually via rather hairy metaprogramming) the type to a value of some sort (e.g., an enumeration).
Perhaps it would be better if you gave a somewhat higher level description of what you're really trying to accomplish here -- the combination of variable argument lists with an attempt at "switch on type" sounds like a train crash about to happen...