As per the document about std::lower_bound, which says that:
The range [first, last) must be partitioned with respect to the expression
element < valueorcomp(element, value), i.e., all elements for which the expression istruemust precede all elements for which the expression isfalse. A fully-sorted range meets this criterion.
I have a little difficulty to fully understand it.
What's element < value? It seems that element (or value) is never mentioned before this paragraph in the aforementioned document. Does the said element mean the elements before the current element, and the said value means the value of the current element?
Aucun commentaire:
Enregistrer un commentaire