2 // { dg-do compile { target c++14 } }
4 template<typename> struct SpecPerType;
9 template<bool> void MbrFnTempl() //Must be a template
12 template<unsigned> struct InnerClassTempl
13 { //Had to be a template whenever I tested for it
14 static void InnerMemberFn();
19 InnerClassTempl<0u>::InnerMemberFn();
23 template<> struct SpecPerType<Specializer>
25 using FnType = void (Specializer::*)();
26 template<bool P> static constexpr FnType SpecMbrFnPtr =
27 &Specializer::template MbrFnTempl<P>;
30 template<bool> constexpr SpecPerType<Specializer>::FnType
31 SpecPerType<Specializer>::SpecMbrFnPtr; //Just a formalism
33 template<unsigned X> void Specializer::InnerClassTempl<X>::InnerMemberFn()
35 using Spec = SpecPerType<Specializer>;
36 typename Spec::FnType ErrorSite = Spec::template SpecMbrFnPtr<true>;
37 //ErrorSite would get called next in the original code
38 //(this should result in a call to MbrFnTempl)