Added proxy for writing integer values into config attributes.

This commit is contained in:
Guillaume Melquiond 2010-04-05 06:01:11 +00:00
parent 1e027ce607
commit a4716378ed
2 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,12 @@ config::proxy_string &config::proxy_string::operator=(bool b)
return *this;
}
config::proxy_string &config::proxy_string::operator=(int v)
{
real_str_ = str_cast(v);
return *this;
}
config config::invalid;
const char* config::diff_track_attribute = "__diff_track";

View File

@ -181,6 +181,7 @@ public:
{ return this->operator=(other.real_str_); }
proxy_string &operator=(bool);
proxy_string &operator=(int);
proxy_string& operator=(const char *str)
{ real_str_ = str; return *this; }