Unix Technical Forum

xlc unordered_set problem

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> ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-28-2008, 04:29 AM
zivnevo@hotmail.com
 
Posts: n/a
Default xlc unordered_set problem

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com