Charles Brockman skrev:
Thorsten Ottosen wrote:
There are some minor differences between std::map
and boost::ptr_map and if this the types that gives you errors, it might be due to these differences. For example, boost::ptr_map :::value_type is not a std::pair . There are also some difference in the way constness is handled, which might also be the source of your problem. Anyway, I would like to know more. I constructed this short do-nothing program, zip_ptr_container_test.cpp. // #include
#include #include <map> #include using boost::zip_iterator; using boost::tuple; using boost::make_tuple; using boost::ptr_map; using std::map;
int main() { //typedef map
theMapType; typedef boost::ptr_map theMapType; typedef zip_iterator > zipIter; theMapType map1; theMapType map2; zipIter(make_tuple(map1.begin(), map2.begin())); } [snip] Are these problems correctable?
I can't figure out where the error is from that. Gcc also fails to compile it, which is good. I don't understand the metaprogramming machinery that boost.iterator is doing here, but apparently my implementation of ptr_map's iterators somehow violate a requirement. -Thorsten