[libcxx-commits] [libcxx] d9c9a74 - [libc++] Add missing friend keyword

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 15 11:21:16 PDT 2020


Author: Louis Dionne
Date: 2020-09-15T14:21:05-04:00
New Revision: d9c9a74d0dc5b64c7c8496294ed962d7ce332337

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

LOG: [libc++] Add missing friend keyword

Otherwise, we're declaring a non-static member function, and that
gives errors in C++11 because of the change of semantics between
C++11 and C++14 for non-const constexpr member functions.

This was always intended to be a friend declaration.

Added: 
    

Modified: 
    libcxx/include/iterator

Removed: 
    


################################################################################
diff  --git a/libcxx/include/iterator b/libcxx/include/iterator
index 45516db24e7c..e2910e9fdc2a 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -1618,7 +1618,7 @@ private:
     __unwrap_iter(__wrap_iter<_Tp*>);
 #else
   template <class _Tp>
-  inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+  inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR friend
   typename enable_if
   <
       is_trivially_copy_assignable<_Tp>::value,


        


More information about the libcxx-commits mailing list