I need to write the class which will accept boost::format() through the operator like cout does:
cout << boost::format("some string; some param = %d\n") % someValue;
Which type of operator’s parameter must be?
So that the class will be declared like this:
class Output
{
Output& operator<<(... format);
}
int main()
{
Output output;
output << boost::format("...");
}
Thanks.
boost::formatis the type you want. It has astr()member to get a std::string.