inline template function?

后端 未结 4 1861
梦毁少年i
梦毁少年i 2020-12-29 02:38

Do I need inline template functions if they are included in several cpp files? Thanks.

template inline QString GetText(         


        
4条回答
  •  太阳男子
    2020-12-29 03:22

    You do, because those are full function specializations, and therefore subject to the one-definition rule just like normal functions.

提交回复
热议问题