When should I use the keyword “typename” when using templates

后端 未结 4 1955
無奈伤痛
無奈伤痛 2020-12-11 23:10

I\'ve been working lately on a small project, and I couldn\'t figure out something..

I\'ve been given a .h file that was containing a class, using a typename templat

4条回答
  •  没有蜡笔的小新
    2020-12-11 23:21

    template
    typename Something::Node * Something::Function1(int index) //Is the return type well written?
    {
            // returns the node at the specified index
    }
    

提交回复
热议问题