<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56695>56695</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
NTTP to subobject of non-prohibited cases should be allowed
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JohelEGP
</td>
</tr>
</table>
<pre>
See https://godbolt.org/z/nT8nxWTsG and https://eel.is/c++draft/temp.arg.nontype#3.
```C++
struct X { int i; };
constexpr X x{};
template<const int&> struct Y { };
Y<x.i> y;
```
```
<source>:4:3: error: non-type template argument refers to subobject 'x.i'
Y<x.i> y;
^
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9Uk2P2yAQ_TX4gmphiO34wGHz0ZV6qFZqpHaPYMYxFTER4G7SX9_B6W63UVVpRszA480bGO3NVX4BoGNK50jEA-Ef0Y7eaO9S6cMRs5_o02E9Xb4e4iNVk7lDA7jSRgx6wjdoJqghYZrgdC5VOJaTn9L1DIQLURK2I-yBNOxm29uV225MYe4T_UZJu6F2StQSscFkh8sN0fspJricA4IuiHp_lss5lYCI7QLLDIQ3ROzpb-Lnhfj9nWcEX0qbMde3zTdx_07FNvo59Fhnj0-wQhfoFELwIQfY7YfcLn0VRPEN5hNgPwEGCJEmT-Osvf4OKIrwNivg7X8UUUrq_Z2aAmTV1Ou24lXNCiOF6USnimSTA_n5cHj6u4wfFmHn4EerbQJDexUh0jj62RmqUaVz_gVMMQcn78bBpnHWZe9PmDj343XJbJkcUxvjDHkG6qbp6mKUXTf0dTt01arSjWjMMOi6h75XbbeuesELpzS4KEmN_88neKELBcak3hVWcsY5a3nNKs55V2qmV6xqlKrWpmHrlqwYnJR1ZdaR57QIcpGk52PEQ2djin8OVYz2OAEs5ZBfzWn0QX7yI7j941Ox1JaL9l-FT-o5">