It is indeed possible, Variant::types
meets the requirement of a Mpl.Sequence type and therefore can be queried like any sequence.
Therefore, using boost::mpl::contains
from here:
// using C++0x syntax to demonstrate what CONDITION should be replaced with
template <typename T>
using Condition = boost::mpl::contains<Variant::types,T>
Nothing simpler, when you know about it ;)
The full MPL Manual is available in HTML format, should you need some more algorithms.
Matthieu M.
2010-09-24 19:26:23