This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Define istream_iterator equality comparison operators out-of-line
ClosedPublic

Authored by miyuki on Nov 24 2017, 3:30 AM.

Details

Summary

[libcxx] Define istream_iterator equality comparison operators out-of-line

Currently libc++ defines operator== and operator!= as friend functions in the definition of the istream_iterator class template. Such definition has a subtle difference from an out-of-line definition required by the C++ Standard: these functions can only be found by argument-dependent lookup, but not by qualified lookup.

This patch changes the definition, so that it conforms to the C++ Standard and adds a check involving qualified lookup to the test suite.

Diff Detail

Event Timeline

miyuki created this revision.Nov 24 2017, 3:30 AM
miyuki retitled this revision from [libcxx to [libcxx] Define istream_iterator equality comparison operators out-of-line.Nov 24 2017, 3:32 AM
miyuki edited the summary of this revision. (Show Details)
miyuki edited the summary of this revision. (Show Details)Nov 24 2017, 3:35 AM
EricWF accepted this revision.Nov 25 2017, 1:13 AM

LGTM. Thanks.

This revision is now accepted and ready to land.Nov 25 2017, 1:13 AM

LGTM. Thanks.

I don't have write access. Please commit the patch on my behalf.

Hi @miyuki I can commit it.

Hi @miyuki I can commit it.

Please do so.

This revision was automatically updated to reflect the committed changes.