28 Mar
2010
28 Mar
'10
10:26 p.m.
Hi, I'd like to be able to query if a MPL Sequence contains a certain type, aka mpl::contains. But mpl::contains is documented to always have linear complexity, even for mpl::set's. How can you differentiate between types of MPL Sequences, so you can use mpl::at for sets and mpl::contains for vectors? MPL itself seems to do this by template specialization, e.g. for mpl::at, which is overloaded. But template specialization relies on MPL implementation details, is there a way to detect any type that models an associative sequence? I can't find something like mpl::is_set nor a tag to dispatch with in the AssociativeSequence concept. Thank you, Stefan