
Hi, I have one simple question for which I could not find answer in Bimap documentatio nor on the list. When searching bimap using find method what is the value of returned iterator if nothing matches search query? Example code: BimapDWORDVariant::right_map::const_iterator right_iter = bm.right.find(sSyncMsg); Thank you. BoskoM.

Hello,
On Sun, Dec 13, 2009 at 9:23 AM, Bosko Markovic
When searching bimap using find method what is the value of returned iterator if nothing matches search query?
Example code: BimapDWORDVariant::right_map::const_iterator right_iter = bm.right.find(sSyncMsg);
bm.right mimics a std::map, and this includes the way find works. If finds fails it will return bm.right.end(). It will become clear if you look at this code: BimapDWORDVariant::right_map & rmap = bm.right; if( rmap.find(sSyncMsg) == rmap.end() ) { ... } Best regards Matias

Matias,
Thank you for your reply.
Regards,
On Sun, Dec 13, 2009 at 1:23 PM, Bosko Markovic
Hi, I have one simple question for which I could not find answer in Bimap documentatio nor on the list.
When searching bimap using find method what is the value of returned iterator if nothing matches search query? Example code:
BimapDWORDVariant::right_map::const_iterator right_iter = bm.right.find(sSyncMsg);
Thank you. BoskoM.
participants (2)
-
Bosko Markovic
-
Matias Capeletto