Issue 87456
Summary Clang accepts forming pointer to ref qualified function type
Labels clang
Assignees
Reporter ranaanoop
    In the following program `#2` is accepted by clang and others but `#1` is rejected. Shouldn't `#2` also be rejected for the same reason.
[Demo](https://godbolt.org/z/n4fdxefGf)
```
#include <type_traits> 
template <class Signature> 
struct Decompose;

template <class T>
struct Decompose<void(T)> {
 using Type = T;
};

template <class T>
using FTDecay = typename Decompose<void(T)>::Type;



// static_assert(std::is_same_v<FTDecay<int()&>, int (*)() &>);  //#1: all rejects this as expected 
 FTDecay<int()&> x{}; //#2: all accepts this why? 
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to