mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-04-30 19:09:26 +08:00
Previously, to_<type> only accepted a string or the same type (identity),
and <type>() constructors only accepted Boxed_Number. This left gaps such as
to_int(char), to_char(int), char(string), int(string), and to_double(char).
Add two overloads to bootstrap_pod_type: to_<name>(Boxed_Number) enables
cross-type numeric conversions (e.g. to_int('A') → 65, to_char(65) → 'A'),
and <name>(string) via parse_string enables construction from strings
(e.g. char("A") → 'A', int("65") → 65, double("3.5") → 3.5).
Co-authored-by: leftibot <leftibot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| dispatchkit | ||
| language | ||
| utility | ||
| chaiscript_basic.hpp | ||
| chaiscript_defines.hpp | ||
| chaiscript_stdlib.hpp | ||
| chaiscript_threading.hpp | ||
| chaiscript.hpp | ||