template template parameters and clang

 ̄綄美尐妖づ 提交于 2019-11-30 20:34:44

As noted, it's a Clang bug. AClass there is an injected-class-name, a unique grammatical construct which is both a class-name and a template-name.

Another workaround is to say AClass::template AClass. This avoids needing to qualify AClass with its enclosing namespace.

Tristan Brindle

The same thing happens for me with Clang 3.3.

The solution -- or workaround -- from this SO question is to replace AClass with ::AClass on lines 47 and 50, and then it compiles happily.

To be honest template template parameters make my head hurt. The referenced question suggests it's a Clang bug, but I'm not enough of an expert to be able to say.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!