1 // Copyright (c) 2012 Agustin K-ballo Berge 2 // Copyright (c) 2001-2012 Hartmut Kaiser 3 // 4 // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 7 #include <boost/config/warning_disable.hpp> 8 #include <boost/spirit/include/karma.hpp> 9 #include <boost/detail/lightweight_test.hpp> 10 11 #include <iterator> 12 #include <sstream> 13 #include <string> 14 main(int argc,char ** argv)15int main( int argc, char** argv ) 16 { 17 namespace karma = boost::spirit::karma; 18 std::string output; 19 std::back_insert_iterator< std::string > sink = std::back_inserter( output ); 20 karma::generate( sink, karma::double_, 0 ); // prints �inf� instead of �0.0� 21 BOOST_TEST((output == "0.0")); 22 return boost::report_errors(); 23 } 24 25