This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problems with the new concepts checking code (boost)


[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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]