Boost logo

Boost Users :

From: Konstantin Litvinenko (Konstantin.Litvinenko_at_[hidden])
Date: 2006-06-06 04:45:24


Hello, Thorsten!
You wrote on Thu, 01 Jun 2006 18:49:17 +0200:

 KL>> 2) Why ptr_multimap_adapter::transfer( iterator object,
 KL>> ptr_multimap_adapter& from ) has void return type instead of iterator?

 TO> Why do you think it should return an iterator?

ptr_multimap<std::string, int> a1;
ptr_multimap<std::string, int> a2;
typedef ptr_multimap<std::string, int>::iterator iterator;

a1.insert("a", 1);
a1.insert("a", 2);
a2.insert("a", 1);
a2.insert("a", 2);

iterator i = a1.insert("a", 3);
iterator r = a2.transfer(i, a1); /// Will not work
return r;

    How can I do this with current interface in a simple way?

With best regards, Konstantin Litvinenko


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