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:
Jason Turner 2018-02-02 20:35:32 -07:00
parent de4b497de1
commit 6c41ac90d8

View File

@ -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);
}