https://bugs.llvm.org/show_bug.cgi?id=48412
Bug ID: 48412
Summary: [Concepts] Constrained 'decltype(auto)' incorrectly
treated as 'auto'
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++2a
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
// https://godbolt.org/z/xxeafq
template<class> concept C = true;
int w;
int& r = w;
C decltype(auto) rr = r; // rr's type should be 'int&', but is 'int'
That is, 'C decltype(auto) rr = r;' SHOULD be treated exactly like
'decltype(auto) rr = r; static_assert(C<decltype(rr)>);' but in fact Clang is
losing the fact that it's supposed to be a reference type.
Bug 48384 is probably related. From the outside, it feels like Clang's parser
is just treating `C decltype(auto)` as a synonym for `C auto` everywhere it
appears.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs