diff --git a/include/chaiscript/dispatchkit/bootstrap_stl.hpp b/include/chaiscript/dispatchkit/bootstrap_stl.hpp index 1b8c674..5a5e43d 100644 --- a/include/chaiscript/dispatchkit/bootstrap_stl.hpp +++ b/include/chaiscript/dispatchkit/bootstrap_stl.hpp @@ -114,13 +114,15 @@ namespace dispatchkit void bootstrap_random_access_container(Dispatch_Engine &system, const std::string &type) { bootstrap_reversible_container(system, type); - typedef typename ContainerType::reference(ContainerType::*indexoper)(size_t); //In the interest of runtime safety for the system, we prefer the at() method for [] access, //to throw an exception in an out of bounds condition. - register_function(system, indexoper(&ContainerType::at), "[]"); - register_function(system, indexoper(&ContainerType::operator[]), "at"); + system.register_function( + boost::function(indexoper(&ContainerType::at)), "[]"); + system.register_function( + boost::function(indexoper(&ContainerType::operator[])), "at"); + } /**