mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Fix issue affecting function ordering for vector
This commit is contained in:
parent
1b7b7d6e2c
commit
650889eae7
@ -254,9 +254,9 @@ namespace chaiscript
|
||||
fun(std::function<typename ContainerType::reference (ContainerType *, int)>
|
||||
(std::mem_fn(static_cast<indexoper>(&ContainerType::at)))), "[]");
|
||||
m->add(
|
||||
fun<typename ContainerType::const_reference (const ContainerType &, int)>(
|
||||
[](const ContainerType &c, int index) -> typename ContainerType::const_reference {
|
||||
return c.at(index);
|
||||
fun<typename ContainerType::const_reference (const ContainerType *, int)>(
|
||||
[](const ContainerType *c, int index) -> typename ContainerType::const_reference {
|
||||
return c->at(index);
|
||||
}), "[]");
|
||||
|
||||
return m;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user