RD
Size: a a a
RD
A
AM
template <class Char, class Traits, class Char2>
std::basic_istream<Char, Traits>& operator>>(std::basic_istream<Char, Traits> &is,
std::basic_string<Char2, std::char_traits<Char2>> &str)
AM
AM
template <class C>
struct lc_t : public std::char_traits<C> {
static bool eq(C c1, C c2) {
return tolower(c1) == tolower(c2);
}
static bool lt(C c1, C c2) {
return tolower(c1) < tolower(c2);
}
static int compare(const C *s1, const C *s2, size_t n) {
for (C c1, c2; n--; ++s1, ++s2)
if (c1 = tolower(*s1), c2 = tolower(*s2); c1 != c2)
return c1 - c2;
return 0;
}
};
AM
TS
template <class Char, class Traits, class Char2>
std::basic_istream<Char, Traits>& operator>>(std::basic_istream<Char, Traits> &is,
std::basic_string<Char2, std::char_traits<Char2>> &str)
AM
TS
template <class C>
struct lc_t : public std::char_traits<C> {
static bool eq(C c1, C c2) {
return tolower(c1) == tolower(c2);
}
static bool lt(C c1, C c2) {
return tolower(c1) < tolower(c2);
}
static int compare(const C *s1, const C *s2, size_t n) {
for (C c1, c2; n--; ++s1, ++s2)
if (c1 = tolower(*s1), c2 = tolower(*s2); c1 != c2)
return c1 - c2;
return 0;
}
};
TS
TS
RN
template <class Char, class Traits, class Char2>
std::basic_istream<Char, Traits>& operator>>(std::basic_istream<Char, Traits> &is,
std::basic_string<Char2, std::char_traits<Char2>> &str)
std::istream& operator>>(std::istream& i, std::string& s){...}?
AM
TS
AM