src: Don't allow const char * in 2nd argument of streq_l(S[N], T)
This commit is contained in:
parent
dad61d032e
commit
72d8d78d36
11
src/util.h
11
src/util.h
|
@ -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);
|
return streq(a, a + (N - 1), b, b + blen);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename CharT, size_t N>
|
template <typename CharT, size_t N, typename T>
|
||||||
bool streq_l(const CharT(&a)[N], const std::string &b) {
|
bool streq_l(const CharT(&a)[N], const T &b) {
|
||||||
return streq(a, a + (N - 1), std::begin(b), std::end(b));
|
return streq(a, a + (N - 1), b.begin(), b.end());
|
||||||
}
|
|
||||||
|
|
||||||
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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns true if |a| contains |b|. If both |a| and |b| are empty,
|
// Returns true if |a| contains |b|. If both |a| and |b| are empty,
|
||||||
|
|
Loading…
Reference in New Issue