What is the standard conform syntax for template constructor inheritance?

你离开我真会死。 提交于 2019-12-03 02:52:10

The answer is a bit buried in the standard. A using declaration is defined as (7.3.3):

using [typename] nested-name-specifier unqualified-id;

The nested-name-specifier resolves after some steps into simple-template-id which is defined as

template-name < [template-argument-list] >

In short, the standard conforming syntax is

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