From: John Love-Jensen <eljay@adobe.com>
To: Alberto Garcia Raboso <Alberto.Garcia.Raboso@cern.ch>,
<gcc-help@gcc.gnu.org>
Subject: Re: STL iterators in gcc 3.2
Date: Fri, 25 Oct 2002 08:42:00 -0000 [thread overview]
Message-ID: <B9DECFAA.5593%eljay@adobe.com> (raw)
In-Reply-To: <Pine.LNX.3.95a.1021025171611.29818A-100000@lxplus001.cern.ch>
Hi Alberto,
> 1.- Whereas I didn't need it before, now I have to use the "using
> namespace std" directive if I want to use cout, cin,... and all this
> stuff. Why the change?
Compliance with ISO 14882 specification standard for C++.
> 2.- This is more serious. In my programs I use a lot of STL vectors, and
> so, iterators too. When I had a method with a pointer argument, I passed a
> random iterator to it. It worked fine with previous versions of gcc, but
> not with 3.2. Is there any way to get it work or do I have to come back to
> an older version?
An iterator is not, necessarily, a pointer. It could be -- and often is --
a UDT.
Can you use template methods? (Would that be Generic Programming, of a
sort?)
Do you have a toy example?
This...
void Foo(int* begin, int* end);
...is different from this...
void Foo(vector<int>::iterator begin, vector<int>::iterator end);
--Eljay
next prev parent reply other threads:[~2002-10-25 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-25 8:24 Alberto Garcia Raboso
2002-10-25 8:42 ` John Love-Jensen [this message]
2002-10-25 8:43 Moore, Mathew L
2002-10-25 8:57 ` Alberto Garcia Raboso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B9DECFAA.5593%eljay@adobe.com \
--to=eljay@adobe.com \
--cc=Alberto.Garcia.Raboso@cern.ch \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).