// Contributed by Dodji Seketeli // Origin PR c++/40808 // { dg-do compile } // This tests the mangling of empty template argument list in a template // id. // { dg-final { scan-assembler "_ZNK5DummyclI3GenEENT_3SigIE10ResultTypeERKS2_" } } struct Void {}; template struct FunType { typedef R ResultType; }; struct WrongNumberOfSigArgs {}; template struct CFunType { template struct Sig : public FunType {}; template struct Sig : public FunType {}; }; struct Dummy { template typename F::template Sig<>::ResultType operator()(F const& f) const { return typename F::template Sig<>::ResultType(0); } }; struct Gen: public CFunType { int operator()() const {return 0;} Gen() {} }; int myfunction() { return Dummy()(Gen()); } int main() { myfunction(); }