c++ STL set difference

后端 未结 10 1723
梦如初夏
梦如初夏 2020-12-23 11:05

Does the C++ STL set data structure have a set difference operator?

10条回答
  •  盖世英雄少女心
    2020-12-23 11:46

    Not an "operator" in the language sense, but there is the set_difference algorithm in the standard library:

    http://www.cplusplus.com/reference/algorithm/set_difference.html

    Of course, the other basic set operations are present too - (union etc), as suggested by the "See also" section at the end of the linked article.

提交回复
热议问题