Commit 72d8d78d authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

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

parent dad61d03
...@@ -318,14 +318,9 @@ bool streq_l(const CharT(&a)[N], InputIt b, size_t blen) { ...@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment