|
Last change
on this file since 30 was
29,
checked in by landauf, 17 years ago
|
|
updated boost from 1_33_1 to 1_34_1
|
|
File size:
741 bytes
|
| Line | |
|---|
| 1 | // (C) Copyright Jonathan Turkanis 2005. |
|---|
| 2 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
|---|
| 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) |
|---|
| 4 | |
|---|
| 5 | // See http://www.boost.org/libs/iostreams for documentation. |
|---|
| 6 | |
|---|
| 7 | #include <cassert> |
|---|
| 8 | #include <string> |
|---|
| 9 | #include <boost/iostreams/stream_facade.hpp> |
|---|
| 10 | #include <libs/iostreams/example/container_device.hpp> |
|---|
| 11 | |
|---|
| 12 | namespace io = boost::iostreams; |
|---|
| 13 | namespace ex = boost::iostreams::example; |
|---|
| 14 | |
|---|
| 15 | int main() |
|---|
| 16 | { |
|---|
| 17 | using namespace std; |
|---|
| 18 | typedef ex::container_sink<string> string_sink; |
|---|
| 19 | |
|---|
| 20 | string result; |
|---|
| 21 | io::stream_facade<string_sink> out(result); |
|---|
| 22 | out << "Hello World!"; |
|---|
| 23 | out.flush(); |
|---|
| 24 | assert(result == "Hello World!"); |
|---|
| 25 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.