There are no arguments that depend on a template parameter

前端 未结 6 1663
囚心锁ツ
囚心锁ツ 2020-12-04 19:13

I am trying to do the following:

template 
std::ifstream& operator>> (std::ifstream& fin, List l)
{
    T temp;
    l.r         


        
6条回答
  •  旧巷少年郎
    2020-12-04 19:36

    For an easier answer, see https://web.archive.org/web/20130423054841/http://www.agapow.net/programming/cpp/no-arguments-that-depend-on-a-template-parameter

    TL;DR: replace ignore() with this->ignore() and your problem will go away.

提交回复
热议问题