aboutsummaryrefslogtreecommitdiff
path: root/common/container
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-03-02 14:39:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-03-02 14:39:13 +0200
commitd5e2ad1054f9e025d12e85e9a124ddbfe10e64cf (patch)
treea12771e5255f2b5999e8d12e6e8147f8a7bac869 /common/container
parent34a371625b17428aa0e35488499a2a7b69b0da27 (diff)
Workaround for VC10 unordered container ordering bug/peculiarity
Diffstat (limited to 'common/container')
-rw-r--r--common/container/driver.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/container/driver.cxx b/common/container/driver.cxx
index 469bba2..c4e1179 100644
--- a/common/container/driver.cxx
+++ b/common/container/driver.cxx
@@ -453,8 +453,8 @@ main (int argc, char* argv[])
// unordered_set
//
full.nus.insert (4567);
- full.sus.insert ("ddddddd");
- full.cus.insert (comp (4567, "ddddddd"));
+ full.sus.insert ("ddddddd1"); // 1 is to preserve order in VC++ 10.
+ full.cus.insert (comp (4567, "ddddddd1"));
// unordered_map
//
@@ -462,14 +462,14 @@ main (int argc, char* argv[])
full.nsum[4567] = "ddddddd";
full.snum["cccccc"]++;
- full.snum["ddddddd"] = 4567;
+ full.snum["ddddddd1"] = 4567;
full.ncum[3456].num++;
full.ncum[3456].str += 'c';
full.ncum[4567] = comp (4567, "ddddddd");
full.csum[comp (3456, "cccccc")] += "c";
- full.csum[comp (4567, "ddddddd")] = "ddddddd";
+ full.csum[comp (4567, "ddddddd1")] = "ddddddd";
#endif
// update