mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 02:44:10 +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>
|
||||
|
||||
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;
|
||||
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;
|
||||
};
|
||||
|
||||
int main(int, char*[])
|
||||
|
Loading…
x
Reference in New Issue
Block a user