Skip to content

Commit

Permalink
ioutils: add printSet
Browse files Browse the repository at this point in the history
  • Loading branch information
zzjjzzgggg committed Mar 29, 2019
1 parent 605a2f8 commit f4f60a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions io/ioutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ void printVec(const std::vector<TVal>& vec) {
std::cout << "}\n";
}

// unordered_set
template <typename TVal>
void printSet(const std::unordered_set<TVal>& set) {
std::cout << "{ ";
for (auto val : set) std::cout << val << ", ";
std::cout << "}\n";
}

// map
template <typename TKey, typename TVal>
void printMap(const std::map<TKey, TVal>& map) {
Expand Down

0 comments on commit f4f60a7

Please sign in to comment.