#3187 closed Bugs (fixed)
symbols::add destroys existing values
Reported by: | 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;
}
Note:
See TracTickets
for help on using tickets.
This is intended behaviour and not a bug.