Bug#206181: gcc: map<bool,bool> does not work
Package: gcc
Version: 2:2.95.4-14
Severity: minor
When I attempt to use the STL container map as follows, gcc issues an error:
map<bool,bool> m;
m.insert(true,true);
The error message is
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_tree.h: In method `void _Rb_tree<bool,pair<const bool,bool>,_Select1st<pair<const bool,bool> >,less<bool>,allocator<bool> >::insert_unique<bool>(bool, bool)':
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_map.h:168: instantiated from here
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_tree.h:981: invalid type argument of `unary *'
Obviously, the map container cannot be used with 'bool' as key type.
I think that this should be mentioned somewhere in the documentation.
Daniel
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux fb04383 2.4.20-2-686-smp #7 SMP Sun Aug 10 13:24:04 EST 2003 i686
Locale: LANG=en_US, LC_CTYPE=en_US
Versions of packages gcc depends on:
ii cpp 2:2.95.4-14 The GNU C preprocessor.
ii cpp-2.95 1:2.95.4-11woody1 The GNU C preprocessor.
ii gcc-2.95 1:2.95.4-11woody1 The GNU C compiler.
Reply to: