|
Boost Users : |
Subject: [Boost-users] Unordered map copy segfaults! (STL map does not)
From: MeMooMeM (mbelgin_at_[hidden])
Date: 2009-08-18 17:46:27
Hi everyone,
When I copy an unordered map, it segfaults. I am not having the same problem
with STL's map. Using an unordered map is essential for performance, so I
would really appreciate any help! Any ideas?
Here are the details:
================
typedef boost::unordered_map<unsigned long long, Dest> MyMap;
MyMap a;
...
... // (I populate map 'a' here in a loop)
...
MyMap b;
b = a; // Segfaults! (also, I do not want to initialize b with a as in MyMap
b(a), I want to copy it later in the code.)
Where Dest is a struct:
struct Dest{
bool exists;
int num;
int src;
int dest;
unsigned short pos[64];
Dest () {
exists = false;
num = 0;
src = 0;
dest = 0;
}
~Dest() { }
};
-- View this message in context: http://www.nabble.com/Unordered-map-copy-segfaults%21-%28STL-map-does-not%29-tp25034074p25034074.html Sent from the Boost - Users mailing list archive at Nabble.com.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net