mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 09:16:53 +08:00
Add to_int(int) and similar overloads
* This is so that `to_int` `to_char` `to_long` and similar work not only with strings but also with built-in types
This commit is contained in:
parent
de4b497de1
commit
6c41ac90d8
@ -144,6 +144,7 @@ namespace chaiscript
|
||||
construct_pod<T>(name, m);
|
||||
|
||||
m.add(fun(&parse_string<T>), "to_" + name);
|
||||
m.add(fun([](const T t){ return t; }), "to_" + name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user