summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/util/impl/stlmap.H1
-rw-r--r--src/usr/testcore/lib/stltest.H6
2 files changed, 6 insertions, 1 deletions
diff --git a/src/include/util/impl/stlmap.H b/src/include/util/impl/stlmap.H
index bed6674b7..599e1ed22 100644
--- a/src/include/util/impl/stlmap.H
+++ b/src/include/util/impl/stlmap.H
@@ -340,7 +340,6 @@ namespace Util
}
else
{
- reinterpret_cast<_Node*>(n)->data_T().second = x.second;
return make_pair(iterator(_TreeItr(&iv_tree, n)),
true);
}
diff --git a/src/usr/testcore/lib/stltest.H b/src/usr/testcore/lib/stltest.H
index b9a16d927..2c4efcb14 100644
--- a/src/usr/testcore/lib/stltest.H
+++ b/src/usr/testcore/lib/stltest.H
@@ -85,6 +85,12 @@ class STLTest : public CxxTest::TestSuite
mymap[v5] = v5;
mymap[v3] = v3;
+ if (v5.value() != mymap[v5].value()) // map::operator[] value
+ {
+ TS_FAIL("map::operator[] returned wrong value %d",
+ mymap[v5].value());
+ }
+
// test map::insert(v), map::insert(h,v), lower_bound()
mymap.insert(std::map<V,V>::value_type(v2,v2)); //map::insert(v);
OpenPOWER on IntegriCloud