на главную | войти | регистрация | DMCA | контакты | справка | donate |      

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Э Ю Я


моя полка | жанры | рекомендуем | рейтинг книг | рейтинг авторов | впечатления | новое | форум | сборники | читалки | авторам | добавить



Description

Lexicographical_compare returns true if the range of elements [first1, last1) is lexicographically less than the range of elements [first2, last2), and false otherwise. Lexicographical comparison means "dictionary" (element-by-element) ordering. That is, [first1, last1) is less than [first2, last2) if *first1 is less than *first2 , and greater if *first1 is greater than *first2. If the two first elements are equivalent then lexicographical_compare compares the two second elements, and so on. As with ordinary dictionary order, the first range is considered to be less than the second if every element in the first range is equal to the corresponding element in the second but the second contains more elements.

The two versions of lexicographical_compare differ in how they define whether one element is less than another. The first version compares objects using operator<, and the second compares objects using a function object comp.


Prototype | Standard Template Library Programmer`s Guide | Definition