[Bug c++/104074] [12 Regression] [c++17] Maybe rejected code: is not a valid type for a template non-type parameter since r12-6022-gbb2a7f80a98de3fe

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 17 21:53:44 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104074

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The following are accepted:
struct f;

template <void (f::*)(void)> class pfm;
template <typename T> using u0 = pfm<&T::recycle>;
template <int f::*> class pmv;
template <typename T> using u1= pmv<&T::recycle>;
template <int*> class ptr;
template <typename T> using u2= ptr<&T::recycle>;

So I don't see why auto would be special not accepting this here.


More information about the Gcc-bugs mailing list