Issue 56695
Summary NTTP to subobject of non-prohibited cases should be allowed
Labels new issue
Assignees
Reporter JohelEGP
    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;
  ^
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to