stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Dean <d...@roguewave.com>
Subject problem with older Standard Library
Date Fri, 16 Dec 2005 23:59:58 GMT
I am working on RedHat 3.0 with the gcc 3.2.3 compiler and also the Rogue
Wave 6 standard librarby version.  
 
I get a memory fault with the following testcase:

#include <map>
#include <string>
#include <set>
class MyClass
{
 public:
  MyClass(const std::string& value_) 
  : _value(value_) {}
  string _value;
};  
typedef std::set<MyClass*> MyClassSet;
typedef std::map<std::string, MyClassSet> MyMap;
static MyClassSet createSet()
{
  MyClassSet s;
  s.insert(new MyClass("test"));
  return s;
}
int main()
{
  MyMap m;
  string key("key");
  m.insert(MyMap::value_type(key, createSet()));
  return 0; 
}

 
Any ideas what might be the problem?
 
Jeremy Dean 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message