19 #ifndef itkLexicographicCompare_h
20 #define itkLexicographicCompare_h
47 template <
class TAggregateType1,
class TAggregateType2>
49 operator()(
const TAggregateType1 & lhs,
const TAggregateType2 & rhs)
const
51 return std::lexicographical_compare(std::begin(lhs), std::end(lhs), std::begin(rhs), std::end(rhs));
73 template <
typename TB
idirectionalRange1,
typename TB
idirectionalRange2>
75 operator()(
const TBidirectionalRange1 & lhs,
const TBidirectionalRange2 & rhs)
const
77 using ReverseIterator1 = std::reverse_iterator<decltype(std::begin(lhs))>;
78 using ReverseIterator2 = std::reverse_iterator<decltype(std::begin(rhs))>;
84 return std::lexicographical_compare(ReverseIterator1{ std::end(lhs) },
85 ReverseIterator1{ std::begin(lhs) },
86 ReverseIterator2{ std::end(rhs) },
87 ReverseIterator2{ std::begin(rhs) });