[ https://issues.apache.org/jira/browse/STDCXX-321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor updated STDCXX-321: -------------------------------- Severity: Compiler Error Affects Version/s: 4.1.2 4.1.4 4.2 This affects all released versions. > error on std::operator==(istream_iterator, istream_iterator) > ------------------------------------------------------------ > > Key: STDCXX-321 > URL: https://issues.apache.org/jira/browse/STDCXX-321 > Project: C++ Standard Library > Issue Type: Bug > Components: 24. Iterators > Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2 > Environment: All > Reporter: Martin Sebor > Fix For: 4.2.1 > > > The well-formed program below fails to compile with both EDG eccp 3.8 and gcc > 4.1.0 (I didn't try others but it's likely a bug in the library) > $ cat t.cpp && make t > #include <iterator> > int main () > { > std::istream_iterator<char, char> i; > (void)(i == i); > } > eccp -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG > -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include > -I/build/sebor/eccp-3.8-11s/include -I/build/sebor/dev/stdlib/include/ansi > -I/build/sebor/PlumHall/lvs06a/conform -I/build/sebor/PlumHall/lvs06a/dst.3 > -A -x --template_directory=/build/sebor/eccp-3.8-11s/lib -g > --display_error_number --remarks --diag_suppress > 193,236,340,401,261,479,487,678,679,815 --diag_suppress > 177,381,191,68,550,611,997,549 t.cpp > "/build/sebor/dev/stdlib/include/rw/_streamiter.h", line 124: error #349: no > operator "!" matches these operands > operand types are: ! std::basic_istream<char, > std::char_traits<char>> > return (__x._C_strm && !!*__x._C_strm) == (__y._C_strm && > !!*__y._C_strm); > ^ > detected during instantiation of "bool std::operator==(const > std::istream_iterator<_TypeT, _CharT, _Traits, _Distance> > &, const std::istream_iterator<_TypeT, _CharT, _Traits, > _Distance> &) [with _TypeT=char, _CharT=char, > _Traits=std::char_traits<char>, _Distance=int]" at line 6 > of "t.cpp" > "/build/sebor/dev/stdlib/include/rw/_streamiter.h", line 124: error #349: no > operator "!" matches these operands > operand types are: ! std::basic_istream<char, > std::char_traits<char>> > return (__x._C_strm && !!*__x._C_strm) == (__y._C_strm && > !!*__y._C_strm); > ^ > detected during instantiation of "bool std::operator==(const > std::istream_iterator<_TypeT, _CharT, _Traits, _Distance> > &, const std::istream_iterator<_TypeT, _CharT, _Traits, > _Distance> &) [with _TypeT=char, _CharT=char, > _Traits=std::char_traits<char>, _Distance=int]" at line 6 > of "t.cpp" > 2 errors detected in the compilation of "t.cpp". > make: *** [t.o] Error 2 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.