[clang] [Clang] Implement resolution for CWG1835 (PR #92957)
Krystian Stasiowski via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 3 04:32:07 PDT 2024
sdkrystian wrote:
This does seem to cause an error in libstdc++:
```
include/c++/11/bits/shared_ptr.h:365:10: error: use 'template' keyword to treat '__shared_ptr' as a dependent template name
this->__shared_ptr<_Tp>::operator=(__r);
^
```
Since `this` is dependent (it's of type `shared_ptr<T>*`) and `shared_ptr` inherits from `__shared_ptr<T>` (i.e. it has a dependent base), `template` is required to treat `<` as the start of a template argument list. I think we can detect these cases and diagnose this as a language extension.
https://github.com/llvm/llvm-project/pull/92957
More information about the cfe-commits
mailing list