Article View: comp.sys.mac.programmer.codewarrior
Article #28STL bug?
From: Janene McCrillis
Date: Wed, 17 Jan 1996 21:31
Date: Wed, 17 Jan 1996 21:31
29 lines
1802 bytes
1802 bytes
I am trying to use the STL map and deque structures in my program and
have run into a strange (to me) error. I have a static member that is a
map in one class and a (non-static) deque member in another. The map is
declared in a source file with no initial storage, eg:
map<int, myStruct*, less<int> > myClass::myMap;
The deque is declared with no storage in the class, eg:
class myClass2 {
deque<int> myDeque;
..
};
When I look at the deque in the debugger, it has a rb_tree in it that has
as a member, the map above, not it's own map. Is this a bug in the
compiler? I have tried to make a small simple example of this, but the
bug did not reappear, making me think it's something I'm doing, but I
don't see what. Do I need to do something more to initialize the map and
deques? Is the static constructor for the map a bad thing? What is an
alternative?
Janene
--------------------------------------------------------------------
|Janene McCrillis | Computing Devices International |
|janene.mccrillis@cdev.com | 6041 S. Syracuse Way, Suite 300 |
|303-779-2881/FAX:779-7704 | Greenwood Village, Colorado, USA 80111 |
--------------------------------------------------------------------
Technical Details
Message-ID:
<4djprk$26i@magpie.cdev.com>Path:
arc1-ca.pugleaf.net!magpie.cdev.com!usenetShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!magpie.cdev.com!usenet From: Janene McCrillis <jmccrils@indra.com> Newsgroups: comp.sys.mac.programmer.codewarrior,comp.lang.c++ Subject: STL bug? Date: 17 Jan 1996 21:31:32 GMT Organization: Computing Devices International Message-ID: <4djprk$26i@magpie.cdev.com> NNTP-Posting-Host: gatormac13.denver.cdev.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.1N (Macintosh; I; 68K) To: jmccrils@indra.com X-URL: news:comp.sys.mac.programmer.codewarrior