From 6c41ac90d84a37fb0f3c1dfb4c3bf2646644d19c Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Fri, 2 Feb 2018 20:35:32 -0700 Subject: [PATCH] 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 --- include/chaiscript/dispatchkit/bootstrap.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/chaiscript/dispatchkit/bootstrap.hpp b/include/chaiscript/dispatchkit/bootstrap.hpp index 8aedb353..bcaebfca 100644 --- a/include/chaiscript/dispatchkit/bootstrap.hpp +++ b/include/chaiscript/dispatchkit/bootstrap.hpp @@ -144,6 +144,7 @@ namespace chaiscript construct_pod(name, m); m.add(fun(&parse_string), "to_" + name); + m.add(fun([](const T t){ return t; }), "to_" + name); }