diff --git a/include/chaiscript/dispatchkit/bootstrap_stl.hpp b/include/chaiscript/dispatchkit/bootstrap_stl.hpp index 82e9f7ae..d686486a 100644 --- a/include/chaiscript/dispatchkit/bootstrap_stl.hpp +++ b/include/chaiscript/dispatchkit/bootstrap_stl.hpp @@ -254,9 +254,9 @@ namespace chaiscript fun(std::function (std::mem_fn(static_cast(&ContainerType::at)))), "[]"); m->add( - fun( - [](const ContainerType &c, int index) -> typename ContainerType::const_reference { - return c.at(index); + fun( + [](const ContainerType *c, int index) -> typename ContainerType::const_reference { + return c->at(index); }), "[]"); return m;