advance();
}
+Formatter::Formatter(const Formatter &other):
+ fmt(other.fmt),
+ pos(fmt.begin()+(other.pos-other.fmt.begin())),
+ result(other.result)
+{ }
+
+Formatter &Formatter::operator=(const Formatter &other)
+{
+ if(&other==this)
+ return *this;
+
+ fmt = other.fmt;
+ pos = fmt.begin()+(other.pos-other.fmt.begin());
+ result = other.result;
+ return *this;
+}
+
const string &Formatter::str() const
{
if(pos!=fmt.end())
if(pos==fmt.end())
throw format_error("Too many arguments for format");
- string::iterator i = pos;
+ auto i = pos;
for(; i!=fmt.end(); ++i)
if(isalpha(*i))
break;