Why can't templates be declared in a function?

后端 未结 7 704
甜味超标
甜味超标 2020-12-01 12:28

Reading C++ Templates: The Complete Guide and it says

Note that templates cannot be declared in a function

It does not give e

7条回答
  •  隐瞒了意图╮
    2020-12-01 12:39

    What exactly would be the use? So you can declare template variables that you can only use within the function? Is that really useful?

提交回复
热议问题