Satisfy assignable requirement for output iterators.

[SVN r19150]
This commit is contained in:
Dave Abrahams 2003-07-16 14:30:47 +00:00
parent d1d0d6b788
commit 632f682292

View File

@ -15,12 +15,18 @@
#include <boost/function_output_iterator.hpp>
struct string_appender {
string_appender(std::string& s) : m_str(s) { }
void operator()(const std::string& x) const {
m_str += x;
struct string_appender
{
string_appender(std::string& s)
: m_str(&s)
{}
void operator()(const std::string& x) const
{
*m_str += x;
}
std::string& m_str;
std::string* m_str;
};
int main(int, char*[])