11 Jul
2017
11 Jul
'17
11:17 p.m.
On 11/07/2017 20:09, Rishabh Arora wrote:
I don't think any of the preprocessor directives will work then? because type cannot be determined at comile time? Is there any other way to do that?
You might want to look at the Boost.Fusion library (http://www.boost.org/doc/libs/1_64_0/libs/fusion/doc/html/). Or if this is C++11+ code, at std::tuple and std::get. Though some of these might still require values known at compile time; depending on your usage you might be able to use constexpr methods for that, however.