模板类的命名约定

时间:2019-09-25 16:22:29

标签: c++ templates naming-conventions default-parameters

我有以下形式的模板类:

 FileSystem.Kill("D:\*.xls*")

在大多数情况下,默认类型都可以。问题是:在我的代码中,我想引用template< typename AType = DefaultAType, typename BType = DefaultBType, typename CType = DefaultCType > class MyClass { }; 而不是MyClass,因为我有点想隐藏一个事实,它是一般用例的模板类。

由于这个原因,我想写:

MyClass<>

现在这只是一个例子,我不想使用下划线作为前缀,我想找到一个很好的命名约定来标识此类,就像接口都以using MyClass = _MyClass<>; // I am still using C++11 and the name needs to be different 开头一样,并且所有抽象类均以I开头。

对于这种类型的模板类,哪个可能是一个很好的可识别名称?

0 个答案:

没有答案