[英]C++ template class constructor
我有一堂課:
template<typename T, typename S>
class filterable_data
{
/* ... */
};
我創建了這兩個實例:
filterable_data<int, char> a;
filterable_data<int, bool> b = a;
我的問題是,如何正確編寫該構造函數?
通過使其也為模板:
template<typename T2, typename S2>
filterable_data(const filterable_data<T2, S2>& other);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.