Opened 11 years ago

#5785 new Bugs

regression in parsing a list of lists

Reported by: matt@… Owned by: Joel de Guzman
Milestone: To Be Determined Component: spirit
Version: Boost 1.47.0 Severity: Regression
Keywords: Cc:

Description

The following code doesn't compile in boost-1.47.0, but compiles fine in boost-1.44.0:

#include <boost/spirit/include/qi.hpp>
#include <boost/fusion/include/std_pair.hpp>

int main ()
{
  std::string str ("0.1:1.5,0.2:4,-1.2:5.5;1:2,3:4,5:6;10:20,20:30,30:40");

  using namespace boost::spirit::qi;
  
  std::vector<std::vector<std::pair<double, double> > > v;
  phrase_parse (str.begin(), str.end (),
                ((double_ >> ':' >> double_) % ',') % ';',
                space, v);

  return 0;
}

The (final) error message is:

include/boost/spirit/home/support/container.hpp:278: error: no matching function for call to ‘std::vector<std::pair<double, double>, std::allocator<std::pair<double, double> > >::insert(__gnu_cxx::__normal_iterator<std::pair<double, double>*, std::vector<std::pair<double, double>, std::allocator<std::pair<double, double> > > >, const double&)’

Change History (0)

Note: See TracTickets for help on using tickets.