src: Don't allow const char * in 2nd argument of streq_l(S[N], T)

This commit is contained in:
Tatsuhiro Tsujikawa 2016-03-25 22:53:31 +09:00
parent dad61d032e
commit 72d8d78d36
1 changed files with 3 additions and 8 deletions

View File

@ -318,14 +318,9 @@ bool streq_l(const CharT(&a)[N], InputIt b, size_t blen) {
return streq(a, a + (N - 1), b, b + blen);
}
template <typename CharT, size_t N>
bool streq_l(const CharT(&a)[N], const std::string &b) {
return streq(a, a + (N - 1), std::begin(b), std::end(b));
}
template <typename CharT, size_t N>
bool streq_l(const CharT(&a)[N], const StringRef &b) {
return streq(a, a + (N - 1), std::begin(b), std::end(b));
template <typename CharT, size_t N, typename T>
bool streq_l(const CharT(&a)[N], const T &b) {
return streq(a, a + (N - 1), b.begin(), b.end());
}
// Returns true if |a| contains |b|. If both |a| and |b| are empty,