Switching .at and [], added out of bounds exception

This commit is contained in:
Jonathan Turner
2009-06-10 23:32:32 +00:00
parent 4d56cffb26
commit da60cad358
2 changed files with 5 additions and 2 deletions

View File

@@ -16,9 +16,9 @@ void bootstrap_random_access_container(BoxedCPP_System &system, const std::strin
typedef typename ContainerType::reference(ContainerType::*indexoper)(size_t);
system.register_function(
boost::function<typename ContainerType::reference (ContainerType *, int)>(indexoper(&ContainerType::operator[])), "[]");
boost::function<typename ContainerType::reference (ContainerType *, int)>(indexoper(&ContainerType::at)), "[]");
system.register_function(
boost::function<typename ContainerType::reference (ContainerType *, int)>(indexoper(&ContainerType::at)), "at");
boost::function<typename ContainerType::reference (ContainerType *, int)>(indexoper(&ContainerType::operator[])), "at");
}
template<typename Assignable>