[llvm] [ADT] Fix missing 'template' keyword (PR #98252)
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 17:56:39 PDT 2024
================
@@ -460,8 +460,8 @@ namespace llvm {
OwningArrayRef &operator=(OwningArrayRef &&Other) {
delete[] this->data();
- this->MutableArrayRef<T>::operator=(Other);
- Other.MutableArrayRef<T>::operator=(MutableArrayRef<T>());
+ this->template MutableArrayRef<T>::operator=(Other);
+ Other.template MutableArrayRef<T>::operator=(MutableArrayRef<T>());
----------------
chapuni wrote:
This fails with Ubuntu-20.04 g++.
```
llvm/include/llvm/ADT/ArrayRef.h:463:40: error: expected ‘;’ before ‘::’ token
463 | this->template MutableArrayRef<T>::operator=(Other);
| ^~
| ;
llvm/include/llvm/ADT/ArrayRef.h:464:40: error: expected ‘;’ before ‘::’ token
464 | Other.template MutableArrayRef<T>::operator=(MutableArrayRef<T>());
| ^~
| ;
```
https://github.com/llvm/llvm-project/pull/98252
More information about the llvm-commits
mailing list