Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#3187 closed Bugs (fixed)

symbols::add destroys existing values

Reported by: olafvdspek@… Owned by: Joel de Guzman
Milestone: Boost 1.40.0 Component: spirit
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:

Description

This code echoes 0 instead of 1, which is not expected. Is this a bug?

#include <boost/spirit/include/classic_symbols.hpp> #include <iostream>

using namespace boost::spirit::classic; using namespace std;

int main() {

symbols<int> s; s.add("a", 1); s.add("a"); cout << *find(s, "a") << endl; return 0;

}

Change History (2)

comment:1 by Hartmut Kaiser, 12 years ago

Resolution: fixed
Status: newclosed

This is intended behaviour and not a bug.

comment:2 by anonymous, 12 years ago

In that case it should be documented.

Note: See TracTickets for help on using tickets.