[Bug libstdc++/17869] New: std::allocator fails for const types
igodard at pacbell dot net
gcc-bugzilla@gcc.gnu.org
Wed Oct 6 19:40:00 GMT 2004
#include <memory>
int main() {
std::allocator<const int> acint;
return 0;
}
gets you:
~/ootbc/members/src$ c++ foo.cc
/mnt/export/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/new_allocator.h:
In instantiation of `__gnu_cxx::new_allocator<const int>':
/mnt/export/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/bits/allocator.h:81:
instantiated from `std::allocator<const int>'
foo.cc:3: instantiated from here
/mnt/export/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/new_allocator.h:75:
error: `const _Tp* __gnu_cxx::new_allocator<_Tp>::address(const _Tp&) const
[with _Tp = const int]' and `_Tp* __gnu_cxx::new_allocator<_Tp>::address(_Tp&)
const [with _Tp = const int]' cannot be overloaded
--
Summary: std::allocator fails for const types
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17869
More information about the Gcc-bugs
mailing list