Skip to content

Commit 5d26f86

Browse files
author
lishuangquan
committed
str: add multiset, multimap
Change-Id: I69aeca0112db525bbcc856dfa1b0597450f759d5
1 parent ae85459 commit 5d26f86

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tostr.h

+16
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ std::string tostr(const std::list<T>& t);
4444
template <typename T, typename U>
4545
std::string tostr(const std::map<T, U>& t);
4646

47+
template <typename T>
48+
std::string tostr(const std::multiset<T>& t);
49+
50+
template <typename T, typename U>
51+
std::string tostr(const std::multimap<T, U>& t);
52+
4753
template <typename T>
4854
std::string tostr(const std::set<T>& t);
4955

@@ -147,6 +153,16 @@ std::string tostr(const std::map<T, U>& t) {
147153
return __item_pair_container_to_str(t.begin(), t.end(), "{", "}", ", ");
148154
}
149155

156+
template <typename T>
157+
std::string tostr(const std::multiset<T>& t) {
158+
return __item_single_container_to_str(t.begin(), t.end(), "{", "}", ", ");
159+
}
160+
161+
template <typename T, typename U>
162+
std::string tostr(const std::multimap<T, U>& t) {
163+
return __item_pair_container_to_str(t.begin(), t.end(), "{", "}", ", ");
164+
};
165+
150166
template <typename T>
151167
std::string tostr(const std::set<T>& t) {
152168
return __item_single_container_to_str(t.begin(), t.end(), "{", "}", ", ");

0 commit comments

Comments
 (0)