src: Make streq(T, S) function template

This commit is contained in:
Tatsuhiro Tsujikawa 2016-03-25 22:48:13 +09:00
parent 3e6c38e3be
commit 1bbb241baa
1 changed files with 2 additions and 2 deletions

View File

@ -314,8 +314,8 @@ bool streq(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) {
return std::equal(first1, last1, first2);
}
inline bool streq(const StringRef &a, const StringRef &b) {
return streq(std::begin(a), std::end(a), std::begin(b), std::end(b));
template <typename T, typename S> bool streq(const T &a, const S &b) {
return streq(a.begin(), a.end(), b.begin(), b.end());
}
template <typename CharT, typename InputIt, size_t N>