operator == - necessary for which STL algorithms?

Discussion in 'C++' started by Stephen Howe, Nov 15, 2010.

  1. Stephen Howe

    Stephen Howe Guest

    Hi

    operator < is necessary to use std::sort(), std::stable_sort(),
    std::partial_sort(), std::inplace_merge(), std::equal_range(),
    std::lower_bound(), std::upper_bound(), std::merge() (as well as set/
    map/multiset/multimap, std::list.sort(), std::list.merge())

    But which algorithms requires == operator?

    I can think of adjacent_find(), find(), unique() - are there any more?

    Is there any URL which lists them all?

    Cheers and thanks

    Stephen Howe
    Stephen Howe, Nov 15, 2010
    #1
    1. Advertising

  2. On 11/15/2010 2:28 PM, Stephen Howe wrote:
    > operator< is necessary to use std::sort(), std::stable_sort(),
    > std::partial_sort(), std::inplace_merge(), std::equal_range(),
    > std::lower_bound(), std::upper_bound(), std::merge() (as well as set/
    > map/multiset/multimap, std::list.sort(), std::list.merge())
    >
    > But which algorithms requires == operator?
    >
    > I can think of adjacent_find(), find(), unique() - are there any more?
    >
    > Is there any URL which lists them all?


    Search for 'EqualityComparable'. You should find 'find', 'search_n',
    'count', 'replace', 'replace_copy', 'remove'. Not sure what else.

    V
    --
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Nov 15, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gawelek
    Replies:
    0
    Views:
    406
    Gawelek
    Nov 23, 2003
  2. Replies:
    2
    Views:
    552
    klaus hoffmann
    Feb 22, 2006
  3. Catherina Svensson
    Replies:
    0
    Views:
    466
    Catherina Svensson
    May 19, 2008
  4. Sortie

    Which files are necessary to be compiled?

    Sortie, Sep 11, 2009, in forum: C Programming
    Replies:
    2
    Views:
    324
    Richard Bos
    Sep 12, 2009
  5. Wolfgang Nádasi-Donner

    Which external modules are necessary for Ruby (1.9)?

    Wolfgang Nádasi-Donner, Dec 25, 2007, in forum: Ruby
    Replies:
    3
    Views:
    101
    Luis Lavena
    Dec 26, 2007
Loading...

Share This Page