Skip to content

[oneDPL] Mismatch between specified default comparator and algorithm signature #573

Open
@dmitriy-sobolev

Description

@dmitriy-sobolev

Let's consider lower_bound as an example:

template<typename Policy, typename InputIt1, typename InputIt2, typename OutputIt,
    typename Comparator =
        std::less<typename std::iterator_traits<InputIt>::value_type>>
OutputIt
lower_bound(Policy&& policy, InputIt1 start, InputIt1 end,
    InputIt2 value_first, InputIt2 value_last, OutputIterator result,
    Comparator comp =
        std::less<typename std::iterator_traits<InputIt1>::value_type>());

...
If no comparator is provided, :code:`operator<` is used to determine when the search value is less than an element in the range being searched.

operator< is specified as a default comparator despite having std::less as a default template parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions