g++ doesn't like template method chaining on template var?

后端 未结 3 1275
天涯浪人
天涯浪人 2021-01-13 10:23

I\'m trying to compile with g++ some code previously developed under Visual C++ 2008 Express Edition, and it looks like g++ won\'t let me call a template m

3条回答
  •  温柔的废话
    2021-01-13 10:33

    could you try with?

    template
    int do_outer(T& val)
    {
      return val.get_inner().template get();
    }
    

    I don't have access to gcc atm, but I've had similar issues and adding the template keyword always solved them. And it works in VS too.

提交回复
热议问题