Defined in the header file `boost/range/algorithm/upper_bound.hpp`
[heading Requirements]
[*For the non-predicate versions:]
* `ForwardRange` is a model of the __forward_range__ Concept.
* `Value` is a model of the `LessThanComparableConcept`.
* The ordering of objects of type `Value` is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
* `ForwardRange`'s value type is the same type as `Value`.
[*For the predicate versions:]
* `ForwardRange` is a model of the __forward_range__ Concept.
* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
* `ForwardRange`'s value type is the same type as `Value`.
* `ForwardRange`'s value type is convertible to both of `BinaryPredicate`'s argument types.
[heading Precondition:]
[*For the non-predicate versions:]
`rng` is sorted in ascending order according to `operator<`.
[*For the predicate versions:]
`rng` is sorted in ascending order according to `pred`.
[heading Complexity]
For ranges that model the __random_access_range__ Concept the complexity is `O(log N)`, where `N` is `distance(rng)`. For all other range types the complexity is `O(N)`.