0
I just don’t understand why it’s wrong. This code works.
template class test{ public: struct st1{ T a, b, c; }; struct st2{ T d, e, f; }; T foo1(st1 *st); st1 *foo2(); }; template typename test::st1 *foo2() { return 0; } template T test::foo1(typename st1 *st) { return 0; }
But this one doesn’t work.
template class test{ public: struct st1{ T a, b, c; }; struct st2{ T d, e, f; }; T foo1(st1 *st); st1 *foo2(); st1 *foo3(st2 *st); }; template T test::foo1(typename st1 *st) { return 0; } template typename test::st1 *foo2() { return 0; } template typename test::st1 *foo3(typename st1 *st) { return 0; }
Honestly, I don’t believe that anyone works http://coliru.stacked-crooked.com/a/e6f47cd72c94782b
– user5299