| Title: | Microsoft Visual C/C++ |
| Moderator: | PLUGH::needle |
| Created: | Tue Mar 16 1993 |
| Last Modified: | Wed Jun 04 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 1121 |
| Total number of notes: | 4385 |
Folks,
Beware, the following crashes!
I'll post the solution as soon as I work it out.. if anyone knows the
answer please don't be shy.
Cheers,
Steve
////////////////////////////////////////////////////////////////////////////
//////////////////////////
#include <list>
#include <map>
class SidlSymbol {};
void main()
{
using namespace std;
map<int, list<SidlSymbol*> > a_map;
a_map[1]; // crash!!
}
////////////////////////////////////////////////////////////////////////////
///////////////////////
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 1091.1 | Fix.. | 12368::"[email protected]" | Stephen Moore | Thu Mar 13 1997 02:58 | 20 |
Solution...
in file map change the operator[] as follows...
Tref operator[](const key_type& _Kv)
{ _Ty t;
iterator _P = insert(value_type(_Kv, t)).first;
return ((*_P).second); }
There appears to be a compiler bug; the orginal code looks OK to me but
just won't work.
Cheers
Steve
[Posted by WWW Notes gateway]
| |||||
| 1091.2 | Alpha only.. this bug does not apply to intel! | NETRIX::"[email protected]" | Stephen Moore | Mon Mar 17 1997 21:13 | 1 |
[Posted by WWW Notes gateway] | |||||
| 1091.3 | DECCXL::OUELLETTE | crunch | Tue Mar 18 1997 13:09 | 1 | |
See 1093.1 | |||||