This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Fix PR 17741
- From: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- To: Chris Jefferson <caj at cs dot york dot ac dot uk>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 1 Nov 2004 17:45:31 +0000
- Subject: Re: Fix PR 17741
- References: <41810FFE.5090509@cs.york.ac.uk> <418115F2.1080308@suse.de> <4181215B.9000406@cs.york.ac.uk>
On Thu, Oct 28, 2004 at 05:42:03PM +0100, Chris Jefferson wrote:
> > 4- In my opinion, this kind of change is more suited for v7-branch.
> >
> I agree. In fact I was torn about if I should bother submitting this, as
> I can't see anyone ever actually coming across this bug...
Sorry for the late reply, I was on holiday last week.
It might not cause much valid code to fail, it can make at least one
compiler diagnostic less useful.
In http://gcc.gnu.org/ml/libstdc++/2004-07/msg00138.html I said:
>>>>>>
A user who accidentally called std::find() with 4 args, not 3, would get
a diagnostic saying there was no matching function, but would also get
something like this:
include/c++/3.4.1/bits/stl_algo.h:171:
note: candidates are: _InputIterator std::find(_InputIterator,
_InputIterator, const _Tp&, std::input_iterator_tag) [with
_InputIterator = int*, _Tp = int]
include/c++/3.4.1/bits/stl_algo.h:201:
note: _RandomAccessIterator
std::find(_RandomAccessIterator, _RandomAccessIterator, const _Tp&,
std::random_access_iterator_tag) [with _RandomAccessIterator = int*, _Tp
= int]
The extra diagnostic adds unnecessary noise
<<<<<<
So I'm glad you fixed it, Chris :-)
jon
--
"With consistency a great soul has simply nothing to do."
- Ralph Waldo Emerson