https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123612
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think that is hopefully sufficiently covered in g++.dg/reflect/type8.C test: type8.C:decltype([: ^^x1 :]) x5 = 18; // type is const int&& type8.C:decltype(([: ^^x1 :])) x6 = 19; // type is const int& type8.C:same_type<decltype([: ^^foo :]), const int&&()> s4b; type8.C:same_type<decltype([: ^^S::i :]), int> s5b; type8.C:same_type<decltype(([: ^^S::i :])), int&> s6b; type8.C:same_type<decltype([: ^^S::mem :]), const int&&()> s7b; type8.C:same_type<decltype(([: ^^S::mem :])), const int&& (&)()> s8b; type8.C:same_type<decltype([: ^^s :].j), int> s9b; type8.C:same_type<decltype(([: ^^s :].j)), int&> s10b; type8.C:same_type<decltype([: ^^N :]::a), N::A> s11b; type8.C:same_type<decltype([: ^^N::a :]), N::A> s11c; type8.C:same_type<decltype([: ^^b :].i), int> s12b; type8.C:same_type<decltype(([: ^^b :].i)), int&> s13b; type8.C: same_type<decltype([: ^^C<T>::t :]), const int>(); type8.C: same_type<decltype(([: ^^C<T>::t :])), const int&>(); type8.C: same_type<decltype([: ^^C<T> :]::t), const int>(); type8.C: same_type<decltype(([: ^^C<T> :]::t)), const int&>(); type8.C: same_type<decltype(template [: ^^C :]<T>::t), const int>(); type8.C: same_type<decltype((template [: ^^C :]<T>::t)), const int&>();
