[Boost-bugs] [Boost C++ Libraries] #9114: Documentation examples not working

Subject: [Boost-bugs] [Boost C++ Libraries] #9114: Documentation examples not working
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-14 12:18:48


#9114: Documentation examples not working
------------------------------+---------------------
 Reporter: ruslan_baratov@… | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------
 Example of ''qi::phrase_parse'' (from this
 [http://www.boost.org/doc/libs/1_54_0/libs/spirit/doc/html/spirit/abstracts/attributes/compound_attributes.html
 page]):
 {{{
 // the following parses "1.0 2.0" into a pair of double
 std::string input("1.0 2.0");
 std::string::iterator strbegin = input.begin();
 std::pair<double, double> p;
 qi::phrase_parse(strbegin, input.end(),
     qi::double_ >> qi::double_, // parser grammar
     qi::space, // delimiter grammar
     p);
 }}}

 and example of ''qi::parse'' (from this
 [http://www.boost.org/doc/libs/1_54_0/libs/spirit/doc/html/spirit/abstracts/attributes/more_compound_attributes.html
 page]):
 {{{
 // the following parses "(1.0, 2.0)" into a pair of double
 std::string input("(1.0, 2.0)");
 std::string::iterator strbegin = input.begin();
 std::pair<double, double> p;
 qi::parse(strbegin, input.end(),
     '(' >> qi::double_ >> ", " >> qi::double_ >> ')', // parser grammar
     p);
 }}}

 both produce compile error:
 {{{
 no matching function for call to 'std::pair<double, double>::pair(const
 double&)'
 }}}

 Compiled with gcc 4.7.3

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9114>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC