Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
102 views

Propagate __VA_ARGS__ macro types inside template methods

I was wondering if there was a clean method to extract types from __VA_ARGS__ and use them to fill template method or structure definitions? Thanks in advance I have the following problem: my macro ...
Gabriel De Champeaux's user avatar
0 votes
1 answer
191 views

How to do a variadic macro and or template and or function that captures the expression as well as its evaluation?

I have overloaded a class with various << operators inline QString operator<<(bool boolean) { return (boolean ? QString("true") : QString("false")); } inline QString ...
Anon's user avatar
  • 2,482
0 votes
2 answers
1k views

How to easily create fully "variadic" functions with C++ 98 standard?

The library https://github.com/c42f/tinyformat/blob/2f9335afd9941688e42d60cae5166b9f0600b2d1/tinyformat.h#L1104-L1116, uses this awesome trick to do "variadic" templates on C++ 98: inline void ...
Evandro Coan's user avatar
  • 9,378
1 vote
2 answers
1k views

Variadic Functions in Visual FoxPro

How does one write a Variadic Function in Microsoft Visual Foxpro? A variadic function is one that accepts a variable number of arguments - see http://en.m.wikipedia.org/wiki/Variadic_function. ...
Caltor's user avatar
  • 2,726
1 vote
2 answers
447 views

Converting a variadic macro to a variadic template function?

Given a variadic macro of the form: #define MY_CALL_RETURN_F(FType, FId, ...) \ if(/*prelude omitted*/) { \ FType f = (FType)GetFuncFomId(FId); \ if(f) { ...
Martin Ba's user avatar
  • 38.7k