Fix issue affecting function ordering for vector

This commit is contained in:
Jason Turner
2015-04-21 23:19:15 -06:00
parent 1b7b7d6e2c
commit 650889eae7

View File

@@ -254,9 +254,9 @@ namespace chaiscript
fun(std::function<typename ContainerType::reference (ContainerType *, int)> fun(std::function<typename ContainerType::reference (ContainerType *, int)>
(std::mem_fn(static_cast<indexoper>(&ContainerType::at)))), "[]"); (std::mem_fn(static_cast<indexoper>(&ContainerType::at)))), "[]");
m->add( m->add(
fun<typename ContainerType::const_reference (const ContainerType &, int)>( fun<typename ContainerType::const_reference (const ContainerType *, int)>(
[](const ContainerType &c, int index) -> typename ContainerType::const_reference { [](const ContainerType *c, int index) -> typename ContainerType::const_reference {
return c.at(index); return c->at(index);
}), "[]"); }), "[]");
return m; return m;