set_utils.hpp
Go to the documentation of this file.
1 #pragma once
2 
11 #include <algorithm>
12 #include <iterator>
13 #include <set>
14 
15 namespace cras
16 {
17 
25 template<typename T>
26 bool isSetIntersectionEmpty(const ::std::set<T>& set1, const ::std::set<T>& set2)
27 {
28  ::std::set<T> tmpSet;
29  ::std::set_intersection(
30  set1.begin(), set1.end(),
31  set2.begin(), set2.end(),
32  ::std::inserter(tmpSet, tmpSet.end()));
33  return tmpSet.empty();
34 }
35 
36 }
bool isSetIntersectionEmpty(const ::std::set< T > &set1, const ::std::set< T > &set2)
Test whether the two given sets have empty intersection.
Definition: set_utils.hpp:26
Definition: any.hpp:15


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sat Jun 17 2023 02:32:53