add += support for strings

This commit is contained in:
Jason Turner 2009-06-10 23:22:31 +00:00
parent e3966eeae1
commit 4d56cffb26
2 changed files with 9 additions and 0 deletions

View File

@ -244,6 +244,12 @@ void add_oper_add(BoxedCPP_System &s)
register_function(s, &add<T, const T&, const T&>, "+");
}
template<typename T>
void add_oper_add_equals(BoxedCPP_System &s)
{
register_function(s, &addsequal<T, T>, "+=");
}
template<typename T>
void add_oper_subtract(BoxedCPP_System &s)
{
@ -480,6 +486,8 @@ void bootstrap(BoxedCPP_System &s)
add_opers_arithmetic_pod(s);
add_oper_add<std::string>(s);
add_oper_add_equals <std::string>(s);
register_function(s, &bool_and<bool, bool>, "&&");
register_function(s, &bool_or<bool, bool>, "||");

View File

@ -286,3 +286,4 @@ public:
typedef Wesley_System<BoxedCPP_System> Wesley_Engine;
#endif /* WESLEY_ENGINE_HPP_ */