|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58071 - trunk/libs/spirit/example/karma
From: hartmut.kaiser_at_[hidden]
Date: 2009-11-30 21:01:31
Author: hkaiser
Date: 2009-11-30 21:01:31 EST (Mon, 30 Nov 2009)
New Revision: 58071
URL: http://svn.boost.org/trac/boost/changeset/58071
Log:
Spirit: Fixed karma example basic_facilities.cpp
Text files modified:
trunk/libs/spirit/example/karma/basic_facilities.cpp | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
Modified: trunk/libs/spirit/example/karma/basic_facilities.cpp
==============================================================================
--- trunk/libs/spirit/example/karma/basic_facilities.cpp (original)
+++ trunk/libs/spirit/example/karma/basic_facilities.cpp 2009-11-30 21:01:31 EST (Mon, 30 Nov 2009)
@@ -44,7 +44,7 @@
}
#include <boost/spirit/include/karma.hpp>
-#include <boost/spirit/include/karma_stream.hpp>
+#include <boost/spirit/include/karma_format.hpp>
using namespace boost::spirit;
using namespace boost::spirit::ascii;
@@ -99,11 +99,11 @@
c // data
) << std::endl << std::endl;
-// os <<
-// karma::format(
-// '[' << (+stream | "empty") << ']', // format description
-// c // data
-// ) << std::endl << std::endl;
+ os <<
+ karma::format(
+ '[' << (+stream | "empty") << ']', // format description
+ c // data
+ ) << std::endl << std::endl;
// output the container as a comma separated list of items enclosed in '()'
os <<
@@ -123,9 +123,9 @@
// output the container as a HTML list
os <<
karma::format_delimited(
- /*"<ol>" << */
+ "<ol>" <<
*verbatim["<li>" << stream << "</li>"]
- /*<< "</ol>"*/, // format description
+ << "</ol>", // format description
'\n', // delimiter
c // data
) << std::endl;
@@ -214,15 +214,15 @@
///////////////////////////////////////////////////////////////////////////
// map of int --> string mappings
-// std::map<int, std::string> mappings;
-// mappings.insert(std::make_pair(0, "zero"));
-// mappings.insert(std::make_pair(1, "one"));
-// mappings.insert(std::make_pair(2, "two"));
-//
-// std::cout << "-------------------------------------------------------------"
-// << std::endl;
-// std::cout << "std::map<int, std::string>" << std::endl;
-// output_container(std::cout, mappings);
+ std::map<int, std::string> mappings;
+ mappings.insert(std::make_pair(0, "zero"));
+ mappings.insert(std::make_pair(1, "one"));
+ mappings.insert(std::make_pair(2, "two"));
+
+ std::cout << "-------------------------------------------------------------"
+ << std::endl;
+ std::cout << "std::map<int, std::string>" << std::endl;
+ output_container(std::cout, mappings);
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk