mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Satisfy assignable requirement for output iterators.
[SVN r19150]
This commit is contained in:
parent
d1d0d6b788
commit
632f682292
@ -15,12 +15,18 @@
|
|||||||
|
|
||||||
#include <boost/function_output_iterator.hpp>
|
#include <boost/function_output_iterator.hpp>
|
||||||
|
|
||||||
struct string_appender {
|
struct string_appender
|
||||||
string_appender(std::string& s) : m_str(s) { }
|
{
|
||||||
void operator()(const std::string& x) const {
|
string_appender(std::string& s)
|
||||||
m_str += x;
|
: m_str(&s)
|
||||||
}
|
{}
|
||||||
std::string& m_str;
|
|
||||||
|
void operator()(const std::string& x) const
|
||||||
|
{
|
||||||
|
*m_str += x;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string* m_str;
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int, char*[])
|
int main(int, char*[])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user