This is a discussion on xlc unordered_set problem within the AIX Operating System forums, part of the Unix Operating Systems category; --> The assertion in the following code fails unjustifiably: #define __IBMCPP_TR1__ 1 #include <unordered_set> #include <assert.h> int main() { std::tr1::unordered_set<int> ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| The assertion in the following code fails unjustifiably: #define __IBMCPP_TR1__ 1 #include <unordered_set> #include <assert.h> int main() { std::tr1::unordered_set<int> set1, set2; set1.insert(1); set1.insert(2); set1.insert(3); set1.insert(4); set2 = set1; set1 = set2; assert (set1.find(1) != set1.end()); return 0; } To compile this code I used: /usr/vacpp/bin/xlC test6.cpp This happens with XlC 7.0, 8.0 and 9.0. This also happens with unordered_map. Similar problems seem to be present in the copy ctor of these classes and the member function clear(). Any ideas? TIA, Ziv. |