This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.

[SVN r21650]
This commit is contained in:
nobody
2004-01-12 20:58:23 +00:00
parent c65ab1a129
commit f05bfdccb7
26 changed files with 1448 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
Example
.......
::
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*[])
{
std::vector<std::string> x;
x.push_back("hello");
x.push_back(" ");
x.push_back("world");
x.push_back("!");
std::string s = "";
std::copy(x.begin(), x.end(),
boost::make_function_output_iterator(string_appender(s)));
std::cout << s << std::endl;
return 0;
}