[libcxx-commits] [libcxx] 1c9b7d0 - [libc++][NFC] Remove redundant friend declaration for operator==

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 31 14:03:11 PDT 2021


Author: Louis Dionne
Date: 2021-08-31T17:02:58-04:00
New Revision: 1c9b7d0eccf98b1268c87c3ef3726b0def8e7788

URL: https://github.com/llvm/llvm-project/commit/1c9b7d0eccf98b1268c87c3ef3726b0def8e7788
DIFF: https://github.com/llvm/llvm-project/commit/1c9b7d0eccf98b1268c87c3ef3726b0def8e7788.diff

LOG: [libc++][NFC] Remove redundant friend declaration for operator==

This must have been meant to be friend-declaring operator!=, but it
turns out that it's not even necessary to make it a friend since it
does not access any private state.

rdar://82568613

Added: 
    

Modified: 
    libcxx/include/__iterator/istream_iterator.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__iterator/istream_iterator.h b/libcxx/include/__iterator/istream_iterator.h
index 36d34090b3d45..979d714edf5d1 100644
--- a/libcxx/include/__iterator/istream_iterator.h
+++ b/libcxx/include/__iterator/istream_iterator.h
@@ -67,12 +67,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     bool
     operator==(const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __x,
                const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __y);
-
-    template <class _Up, class _CharU, class _TraitsU, class _DistanceU>
-    friend _LIBCPP_INLINE_VISIBILITY
-    bool
-    operator==(const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __x,
-               const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __y);
 };
 
 template <class _Tp, class _CharT, class _Traits, class _Distance>


        


More information about the libcxx-commits mailing list