c++ - 复合模板
问题描述
我正在尝试制作“复合”模板类型。像这样的东西
template <typename A, typename T>
class configurator
{
public:
configurator(const A<T> & adapter) : m_adapter(adapter) {}
private:
A<T> m_adapter;
};
编译器抱怨
error: expected ')'
configurator(const A<T> & adapter
^
为什么这不起作用?有可能让它工作吗?
解决方案
推荐阅读
- java - Java Spring API - continous status
- amazon-web-services - Amazon S3 - 前缀可以包含文件名的开头吗?
- android - 如何用字符串制作 IntTween 动画?
- javascript - Vue JS 仪表板模板未在浏览器中正确加载
- css - Material Design vs Bootstrap React、Angular、Vue 实现
- github-actions - GitActions 作业名称基于矩阵索引而不是矩阵值
- f# - 具有 3 个参数的 F# 自定义运算符
- python - 自动调整列宽以适应熊猫生成的 Excel 文件中的内容
- node.js - 从 Angular 项目创建一个 docker 容器
- powerbi - Power BI 计算具有多个 ALL 条件的度量以绕过切片器