| Issue |
181088
|
| Summary |
Clang crash with non-type template parameter using pointer-to-member of class
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
ccotter
|
```
template <auto _Ptr>
class __intrusive_mpsc_queue;
template <class T>
struct AT {
T t_;
};
template <class _Node, AT<_Node*> _Node::* _Next>
class __intrusive_mpsc_queue<_Next> {};
struct cc {
AT<void*> next_{nullptr};
};
enum something {};
void foo() {
__intrusive_mpsc_queue<&something::next_> command_queue_;
}
```
The above code is not valid and should not compile; it crashes clang-21 and clang trunk: https://godbolt.org/z/znMEPn6a8 .. clang-20 does not crash.
Note that `&something::next_` is passed, even though `something` is an enum,
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs