Calling template methods in template classes

后端 未结 2 1210
夕颜
夕颜 2021-02-08 23:12

I\'m attempting to figure out why some code that I have won\'t compile and I done a fair bit of reduction an anonymizing to end up with this example:

#define NUL         


        
2条回答
  •  鱼传尺愫
    2021-02-09 00:01

    Need to add the template keyword:

    return ap->template amem();
    

    Please read Where and why do I have to put the “template” and “typename” keywords? for an in-depth explanation.

提交回复
热议问题