Boost logo

Boost Users :

Subject: [Boost-users] recursive variant with mpl::vector
From: Surya Kiran Gullapalli (suryakiran.gullapalli_at_[hidden])
Date: 2010-05-21 04:48:39


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.





Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net