public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/6642: Constness prevents substraction of iterators
@ 2002-07-02 13:06 Paolo Carlini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Carlini @ 2002-07-02 13:06 UTC (permalink / raw)
To: paolo; +Cc: gcc-prs
The following reply was made to PR libstdc++/6642; it has been noted by GNATS.
From: Paolo Carlini <pcarlini@unitus.it>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, ofv@wanadoo.es,
gcc-bugs@gcc.gnu.org
Cc:
Subject: Re: libstdc++/6642: Constness prevents substraction of iterators
Date: Tue, 02 Jul 2002 21:56:58 +0200
Patch applied to trunk:
http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00080.html
Paolo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6642
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/6642: Constness prevents substraction of iterators
@ 2002-07-25 4:36 paolo
0 siblings, 0 replies; 4+ messages in thread
From: paolo @ 2002-07-25 4:36 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, ofv, paolo
Synopsis: Constness prevents substraction of iterators
State-Changed-From-To: analyzed->closed
State-Changed-By: paolo
State-Changed-When: Thu Jul 25 04:36:13 2002
State-Changed-Why:
Fixed for 3.2 and 3.3 together with the related 6503 and
7186.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6642
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/6642: Constness prevents substraction of iterators
@ 2002-05-29 2:46 paolo
0 siblings, 0 replies; 4+ messages in thread
From: paolo @ 2002-05-29 2:46 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, ofv, paolo
Synopsis: Constness prevents substraction of iterators
Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Wed May 29 02:44:32 2002
Responsible-Changed-Why:
Working on it
State-Changed-From-To: open->analyzed
State-Changed-By: paolo
State-Changed-When: Wed May 29 02:44:32 2002
State-Changed-Why:
Confirmed. See DR179 <Ready>.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6642
^ permalink raw reply [flat|nested] 4+ messages in thread
* libstdc++/6642: Constness prevents substraction of iterators
@ 2002-05-12 22:26 ofv
0 siblings, 0 replies; 4+ messages in thread
From: ofv @ 2002-05-12 22:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 6642
>Category: libstdc++
>Synopsis: Constness prevents substraction of iterators
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Sun May 12 22:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Oscar Fuentes
>Release: gcc version 3.1 20020510 (prerelease)
>Organization:
>Environment:
Reading specs from t:\msys\1.0\mingw\bin\..\lib\gcc-lib\i686-pc-mingw32\3.1\specs
Configured with: ../gcc-3.1-20020510/configure --enable-languages=c,c++ --enable-threads=win32 --enable-sjlj-exceptions --prefix=t:/msys/1.0/mingw
Thread model: win32
gcc version 3.1 20020510 (prerelease)
>Description:
Substraction of iterators being the first operand 'non-const' and the second 'const' are not possible.
>How-To-Repeat:
#include <string>
class MyClass {
private:
std::string s;
std::string::iterator it;
public:
unsigned pos() const {
return it - s.begin();
}
};
Gives
t:/msys/1.0/mingw/include/g++-v3/bits/stl_iterator.h: In constructor
`__gnu_cxx::__normal_iterator<_Iterator,
_Container>::__normal_iterator(const __gnu_cxx::__normal_iterator<_Iter,
_Container>&) [with _Iter = const char*, _Iterator = char*, _Container =
std::basic_string<char, std::char_traits<char>, std::allocator<char> >]':
case.cpp:9: instantiated from here
t:/msys/1.0/mingw/include/g++-v3/bits/stl_iterator.h:589: invalid conversion
from `const char* const' to `char*'
>Fix:
-(s.begin() - it) works :-)
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-07-25 11:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-02 13:06 libstdc++/6642: Constness prevents substraction of iterators Paolo Carlini
-- strict thread matches above, loose matches on Subject: below --
2002-07-25 4:36 paolo
2002-05-29 2:46 paolo
2002-05-12 22:26 ofv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).