
21 May
2010
21 May
'10
8:48 a.m.
Hello all, I'm trying to create a recursive variant over an MPL vector.http://?shva=1#drafts/128ba01f42cb2169 attached is the code. I'm trying to add a templated function isType, which will return true if the type stored in variant is the type queried for or false otherwise. This doesn't work for recursive types. In the example, I expect the program outputs "Map Type" because the type stored in the variant is a map. but it says the type is not map. The problem is mpl::contains returns false for map type. (The type stored in mpl vector is boost::recursive_wrapper< map ... >, where as, I'm querying for map...). what is the way forward from here. Thanks, Surya.