Bug 1498929: Access to member fields of map elements.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12643 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
11318bedff
commit
4b9ef9bc99
5 changed files with 36 additions and 1 deletions
|
|
@ -187,7 +187,7 @@
|
|||
#endif
|
||||
|
||||
%extend {
|
||||
mapped_type __getitem__(const key_type& key) const throw (std::out_of_range) {
|
||||
mapped_type const & __getitem__(const key_type& key) throw (std::out_of_range) {
|
||||
Map::const_iterator i = self->find(key);
|
||||
if (i != self->end())
|
||||
return i->second;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue