Fix PR 17741
Jonathan Wakely
cow@compsoc.man.ac.uk
Mon Nov 1 17:45:00 GMT 2004
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
More information about the Libstdc++
mailing list