Can a parameter of a template template parameter cause shadowing?

后端 未结 1 823
孤街浪徒
孤街浪徒 2021-01-18 02:15

Is this legal C++?

template  class>
struct S { };

Clang (3.7.1) rejects it, complaining the s

相关标签:
1条回答
  • 2021-01-18 02:44

    No. [temp.local]/6:

    A template-parameter shall not be redeclared within its scope (including nested scopes).

    0 讨论(0)
提交回复
热议问题