Ticket #7637: karma_real_generator_int_test.cpp
| File karma_real_generator_int_test.cpp, 470 bytes (added by , 10 years ago) |
|---|
| Line | |
|---|---|
| 1 | |
| 2 | #include <boost/assert.hpp> |
| 3 | |
| 4 | #include <boost/spirit/include/karma.hpp> |
| 5 | |
| 6 | #include <iterator> |
| 7 | #include <sstream> |
| 8 | #include <string> |
| 9 | |
| 10 | int main( int argc, char** argv ) |
| 11 | { |
| 12 | namespace karma = boost::spirit::karma; |
| 13 | |
| 14 | karma::real_generator< int > real_; |
| 15 | |
| 16 | std::string output; |
| 17 | std::back_insert_iterator< std::string > sink = std::back_inserter( output ); |
| 18 | karma::generate( sink, karma::double_ << real_, 12345., 12345 ); |
| 19 | |
| 20 | return 0; |
| 21 | } |
