Generated 'item' type is always std::pair for map containers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyBindGen |
Confirmed
|
Low
|
Gustavo Carneiro |
Bug Description
The generated code for any "map" like container always uses a std::pair. We have an alternate STL implementation in its own namespace and so std::pair<> is incompatible for our map class. In any case, it is more portable to use the map<K,V>
-------------- CURRENT ---------------
if (!%(KEY_
}
if (!%(ITEM_
}
-------------- PROPOSED ---------------
if (!%(KEY_
}
if (!%(ITEM_
}
I would rather avoid the key and value temp vars, if possible, for the sake of efficiency. Question, can we assume %(CTYPE) s::value_ type always has a 'first' and 'second', like std::pair, at least?