Thread View: comp.sys.mac.programmer.codewarrior
1 messages
1 total messages
Started by Janene McCrillis
Wed, 17 Jan 1996 21:33
STL bug?
Author: Janene McCrillis
Date: Wed, 17 Jan 1996 21:33
Date: Wed, 17 Jan 1996 21:33
29 lines
1809 bytes
1809 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 |
--------------------------------------------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads