Skip to content

Commit 939774f

Browse files
committed
[FOLD] fix error in llvm/ADT/ArrayRef.h
1 parent cb0206d commit 939774f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

llvm/include/llvm/ADT/ArrayRef.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,11 @@ namespace llvm {
460460

461461
OwningArrayRef &operator=(OwningArrayRef &&Other) {
462462
delete[] this->data();
463-
this->MutableArrayRef<T>::operator=(Other);
464-
Other.MutableArrayRef<T>::operator=(MutableArrayRef<T>());
463+
using Base = MutableArrayRef<T>;
464+
// GCC versions prior to 11.1 incorrectly reject if the 'template' keyword
465+
// is used prior to the nested-name-specifier here.
466+
this->Base::operator=(Other);
467+
Other.Base::operator=(Base());
465468
return *this;
466469
}
467470

0 commit comments

Comments
 (0)