<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95598>95598</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
__is_pointer used both as a trait and an identifier seems inconsistent
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
pinskia
</td>
</tr>
</table>
<pre>
Take:
```
template<typename _Tp, bool _IsPtr = __is_pointer(_Tp)>
struct __is_pointer {};
template<typename _Tp>
inline bool t = __is_pointer(_Tp); // is accepted
template<bool>
struct ts{};
template<typename _Tp>
struct is_pointer : ts<__is_pointer(_Tp)> {}; // is rejected
int tt = t<int>;
```
I would have expected the variable template t would have been rejected the same way as the template argument for the base class is_pointer being rejected but it is inconsistent here.
This shows up now in libstdc++'s headers (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115497).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycU19vmzAQ_zTm5VQENgnhgYcmGVLf9tD3yDZX8OoY5DuSdZ9-grRpWq3TNMlKZPnu9-84TeS6gFiL1Vas9omeuB9iPbpAz04nZmhf6kf9jELdi2wvsnuxzl7P5br8Mh5HrxmF2vHLiEEfEQ6Po5A7MMPg4fBA3zmCUHs4HBwdxsEFxijkZqmqhPp2AQIgjpPlD2Ugyq0o90Jt_4XzDcoF7wJe-Plv1FsQshGyAUegrcWRsf2CaAa7ErwqZfoveVentz7V_Qyndl-F9J7EjeaIP9B-0uwCA19cs1A7F3gmvir80wwf4DxMvoVenxDw57hgAvcIJx2dNh7hzRPwba1BDFcRSwPNZs_6BTQt92ufjt10xMDwNMTlxWhCsF4T3eZg0IXuHdJMDG4OClywQyBHPGP0GDG9dfDYOwLqhzPBNEIYzuACeGeIWyvkdjklQY-6xUgg5KZnHmn-tJcwO2vTLkzpEDshGzN1v5z3WshmxjyYqUtt54RqXCvUPs9XRVUKWaVJW6u2UpVOsM7LfKOqcrPOkr422rZSr7EylVZFuVErkyFaizbP18rKxNUyk0W2zguZFYXMUlUUeWvXq7YsnyqblaLI8KidT70_HWddiSOasK5Wq2qTeG3Q07K5UgY8w_IopJwXOdZzz52ZOhJF5h0xvaOwY4_1hx2baE564H4emgaO2jHo0IIO4FoM7J4cRiDE48c5JFP09acgHfeTSe1wFLKZSV__7sY4zDMVslmkkpDNxcqplr8DAAD__4Lfb-w">