https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61182
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to pdaouadi from comment #3) > Still, if the standard says that it is not allowed we can work around it, > but then should I file a bug to clang? And Boost. I have to wonder why their remove_const is so much more complicated than ours: template<typename _Tp> struct remove_const { typedef _Tp type; }; template<typename _Tp> struct remove_const<_Tp const> { typedef _Tp type; }; That doesn't need to form a pointer then remove it again, so works with function types.