Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/150...@github.com>


tbaederr wrote:

Is there a trick I'm missing?
I _can_ do this:
```c++
private int *p = 0;
private int *q = fold(reinterpret_cast<private int*>(0));
```

But this won't work:
```c++
template<const int*> void f() {}
template void f<fold(reinterpret_cast<private int*>(0))>();
```
```console
array.cpp:95:15: error: explicit instantiation of 'f' does not refer to a 
function template, variable template, member function, member class, or static 
data member
   95 | template void f<fold(reinterpret_cast<private int*>(0))>();
      |               ^
array.cpp:94:27: note: candidate template ignored: invalid explicitly-specified 
argument for 1st template parameter
   94 | template<const int*> void f() {}
      |                           ^
```
so I'm not sure how to test the mangling here.

https://github.com/llvm/llvm-project/pull/150164
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to