Tho*_*mas 1 c++ templates template-method-pattern
在对上一个问题的有用答案之后,我开始使用模板方法模式来创建具有许多不同选项的类.如果没有全部实现它们,那么我对该类对象的当前声明现在看起来像这样:
pc < prg, tc, 9, 0, 4, 4, test, true, true, true, true, false, true, true, 10, 0, -1, 3, 3 > mp;
Run Code Online (Sandbox Code Playgroud)
你如何处理长模板参数列表?我应该使用枚举/定义而不是真/假和数字吗?有常用的替代品吗?