https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116366
--- Comment #4 from Yi Qingliang <niqingliang2003 at gmail dot com> --- (In reply to Andrew Pinski from comment #3) > Note it is unrelated to member objects too as shown by: > ``` > > template<class T> > auto declval() -> T&; > > static int x; > > template<auto * M> > using mem_type = decltype(*M); > > template<auto * M, typename T = mem_type<M>> > void set_mem(const T& v) > { > *M = v; > } > > static constexpr auto p = &set_mem<&x>; > ``` YOU ARE RIGHT!