diff --git a/boxedcpp/bootstrap.hpp b/boxedcpp/bootstrap.hpp index a691361..d0811bc 100644 --- a/boxedcpp/bootstrap.hpp +++ b/boxedcpp/bootstrap.hpp @@ -205,6 +205,13 @@ void add_opers_arithmetic_overload(BoxedCPP_System &s) register_function(s, &addsequal, "+="); } +template +void add_basic_constructors(BoxedCPP_System &s, const std::string &type) +{ + s.register_function(build_constructor(), type); + s.register_function(build_constructor(), type); +} + template void add_opers_arithmetic(BoxedCPP_System &s) { @@ -226,6 +233,15 @@ void bootstrap(BoxedCPP_System &s) s.register_type("char"); s.register_type("bool"); s.register_type("string"); + + add_basic_constructors(s, "double"); + add_basic_constructors(s, "int"); + add_basic_constructors(s, "char"); + add_basic_constructors(s, "bool"); + add_basic_constructors(s, "string"); + + + add_opers_comparison(s); add_opers_comparison(s);