Skip to content

Commit

Permalink
resolve ambiguous call to WayNodeList::operator[]
Browse files Browse the repository at this point in the history
Newer libosmium overloads the [] operator, so we need to
specifiy which one to use.

Fixes #24
  • Loading branch information
lonvia committed Jan 15, 2017
1 parent 0d68b26 commit a556231
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/osm.cc
Expand Up @@ -170,7 +170,8 @@ BOOST_PYTHON_MODULE(_osm)
"is normally not used directly, use one of its subclasses instead.",
no_init)
.def("__len__", &osmium::NodeRefList::size)
.def("__getitem__", &osmium::NodeRefList::operator[], return_value_policy<reference_existing_object>())
.def("__getitem__",
make_function(static_cast<const osmium::NodeRef& (osmium::NodeRefList::*)(osmium::NodeRefList::size_type) const>(&osmium::NodeRefList::operator[]), return_value_policy<reference_existing_object>()))
.def("__iter__", iterator<osmium::NodeRefList,return_internal_reference<>>())
.def("is_closed", &osmium::NodeRefList::is_closed, args("self"),
"True if the start and end node are the same (synonym for "
Expand Down

0 comments on commit a556231

Please sign in to comment.