mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: fix C++ conformance
Reported by Thomas Jahns. http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html * tests/c++.at (Exception safety): Add missing include. Don't use const_iterator for erase.
This commit is contained in:
@@ -719,6 +719,7 @@ $1
|
||||
#include <cstdlib> // size_t and getenv.
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
bool debug = false;
|
||||
|
||||
@@ -751,7 +752,7 @@ $1
|
||||
~Object ()
|
||||
{
|
||||
log (this, "Object::~Object");
|
||||
objects::const_iterator i = instances.find (this);
|
||||
objects::iterator i = instances.find (this);
|
||||
// Make sure this object is alive.
|
||||
assert (i != instances.end ());
|
||||
Object::instances.erase (i);
|
||||
|
||||
Reference in New Issue
Block a user