Index: include/istream =================================================================== --- include/istream +++ include/istream @@ -695,6 +695,11 @@ return *this; } +#if __clang_major__ >= 6 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-constant-compare" +#endif + template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(int& __n) @@ -735,6 +740,10 @@ return *this; } +#if __clang_major__ >= 6 +#pragma clang diagnostic pop +#endif // __clang__ + template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s) Index: src/string.cpp =================================================================== --- src/string.cpp +++ src/string.cpp @@ -80,6 +80,11 @@ V as_integer(const string& func, const S& s, size_t* idx, int base); +#if __clang_major__ >= 6 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-constant-compare" +#endif + // string template<> inline @@ -93,6 +98,10 @@ return static_cast(r); } +#if __clang_major__ >= 6 +#pragma clang diagnostic pop +#endif + template<> inline long @@ -125,6 +134,11 @@ return as_integer_helper( func, s, idx, base, strtoull ); } +#if __clang_major__ >= 6 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-constant-compare" +#endif + // wstring template<> inline @@ -138,6 +152,10 @@ return static_cast(r); } +#if __clang_major__ >= 6 +#pragma clang diagnostic pop +#endif + template<> inline long