In many places, the idiom:
if(isa<T0>(V) || isa<T1>(V) || isa<T2>(V)) //...
is used. This commit introduces a new function, isoneof, that captures this idiom:
if(isa<anyof<T0, T1, T2>>(V)) //...
That's somehow similar to the tuple version of isinstance in Python.
Note to the reviewers: I wonder whether isa<> should be made variadic instead?
Please make this a doxygen comment, and no need to repeat the name in it.
Also, your example code calls this isa instead of isonef.