Last change
on this file since 29 was
29,
checked in by landauf, 16 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
781 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_source<string> string_source; |
---|
19 | |
---|
20 | string input = "Hello World!"; |
---|
21 | string output; |
---|
22 | io::stream_facade<string_source> in(input); |
---|
23 | getline(in, output); |
---|
24 | assert(input == output); |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.