Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5991: find_ptr (find wrapper)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-03 15:23:37
#5991: find_ptr (find wrapper)
-------------------------------------------------------+--------------------
Reporter: Olaf van der Spek <olafvdspek@â¦> | Owner: joaquin
Type: Feature Requests | Status: closed
Milestone: To Be Determined | Component: multi_index
Version: Boost 1.47.0 | Severity: Problem
Resolution: wontfix | Keywords:
-------------------------------------------------------+--------------------
Comment (by Olaf van der Spek <olafvdspek@â¦>):
Look at
http://www.boost.org/doc/libs/1_47_0/libs/multi_index/example/bimap.cpp
for example.
{{{
dictionary::iterator it=get<from>(d).find(word);
if(it!=d.end()){
std::cout<<word<<" is said "<<it->second<<" in English"<<std::endl;
}
}}}
1. Shouldn't it be get<from>(d).end()?
2. You're not using it->first.
With bimaps though, you'd probably want to return a ptr to the pair.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5991#comment:8> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC