struct safe_string
{
safe_string(const std::string & str = std::string())
: str_ (str.c_str())
{
}
safe_string(const safe_string & copy)
: str_(copy.str_.c_str())
{
}
safe_string & operator = (const safe_string & copy)
{
str_ = copy.str_.c_str();
return *this;
}
std::string str_;
};
No comments:
Post a Comment