3 Dec
2009
3 Dec
'09
11:02 p.m.
Jonathan Chambers` wrote:
I'm trying to get the program to compile if the variant takes on the guise of an int (because I've implemented void operator()(int &i) const, but not compile if I make the variant take the guise of a char e.g. boost::variant
var = 'a'; because I've not implemented the void operator()(char &c) const
The value (and thus actual type) of a variant is a runtime property; there cannot be a way to achieve what you want. Sebastian