[Bug libstdc++/16875] Fails to compile: STL container of const pointer to X

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Thu Aug 5 08:03:00 GMT 2004


------- Additional Comments From gdr at integrable-solutions dot net  2004-08-05 08:03 -------
Subject: Re:  Fails to compile: STL container of const pointer to X

"pcarlini at suse dot de" <gcc-bugzilla@gcc.gnu.org> writes:

| ... indeed, the error:
| 
| /usr/include/c++/3.2.2/bits/stl_alloc.h:674: `const _Tp* 
|    std::allocator<_Alloc>::address(const _Tp&) const [with _Tp = X* const]' and 
|    `_Tp* std::allocator<_Alloc>::address(_Tp&) const [with _Tp = X* const]' 
|    cannot be overloaded
| 
| definitely makes sense for _Tp == X* const!
| 
| Gaby?

The code shown in the report does not make sense: You can't put a
const T in a standard sequence.
People have figured out that there is another issue with allocator.
So the PR is doubly invalid :-)

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16875



More information about the Gcc-bugs mailing list