This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Problems with the new concepts checking code (boost)
- To: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Subject: Re: Problems with the new concepts checking code (boost)
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Mon, 9 Apr 2001 17:49:02 -0400
- Cc: Benjamin Kosnik <bkoz at redhat dot com>, Peter Schmid <schmid at snake dot iap dot physik dot tu-darmstadt dot de>, libstdc++ at gcc dot gnu dot org
- References: <Pine.SOL.3.91.1010406121039.6149D-100000@cse.cygnus.com> <flg0flenfn.fsf@sel.cmla.ens-cachan.fr>
[Peter, you also replied to Gaby's message, but it was empty.]
On Fri, Apr 06, 2001 at 11:19:24PM +0200, Gabriel Dos Reis wrote:
> Concept checking is a cool idea. When it works :-)
Isn't everything? :-)
> I'm trying to check-in Joe's patch about std::equal with a test case
> and I'm surprised to find the following inside std::equal:
>
> glibcpp_function_requires(EqualityComparableConcept<
> typename iterator_traits<_InputIter2>::value_type>);
>
> which is wrong.
Well, it's the same thing that was there before, so if it's wrong now,
it's always been wrong.
And it seems to be wrong. It's testing that *__first2 == *__first2 would
work, but what we want tested is *__first1 == *__first2 . This should be
EqualOpConcept, not EqualityComparableConcept. (See for example find()
in stl_slgo.h.)
I'll make this change later today, unless anybody can spot others.
Phil
Also assuming that our &!#$&*# routers stay up and running....
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.