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]
Other format: [Raw text]

Re: [Patch] First bits of the algo merge


On Dec 15, 2005, at 5:04 AM, Paolo Carlini wrote:

Indeed, there is a whole series of functions, those that you pointed
out, which have got a very strong (too strong)
_SameTypeConcept<_ValueType1, _ValueType2> in the predicated version of
the algorithm (e.g., includes, set_*, etc.). Because of that, I believe
_LessThanComparableConcept<_ValueType1> is currently equivalent to what
you are suggesting.


Therefore, the real question is: shall we remove
_SameTypeConcept<_ValueType1, _ValueType2> from the predicated version,
in those cases? Let's reach an agreement about that and let's go ahead
with this part of the work!

Ah, good point.


I'm concentrating on set_difference here (predicated version):

How 'bout:

__glibcxx_function_requires (_InputIteratorConcept<_InputIterator1>)
__glibcxx_function_requires (_InputIteratorConcept<_InputIterator2>)
__glibcxx_function_requires (_OutputIteratorConcept<_OutputIterator,
typename iterator_traits<_InputIterator1>::value_type>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
typename iterator_traits<_InputIterator1>::value_type,
typename iterator_traits<_InputIterator2>::value_type>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
typename iterator_traits<_InputIterator2>::value_type,
typename iterator_traits<_InputIterator1>::value_type>)
__glibcxx_requires_sorted_pred(__first1, __last1, __comp);
__glibcxx_requires_sorted_pred(__first2, __last2, __comp);


I've removed _SameTypeConcept, and added the reverse _BinaryPredicateConcept (which could be made neater with typedefs). I think all of the set_* animals need that binary predicate both ways.

-Howard


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