sha*_*ane 8 c++ variadic-templates
我想实例化一个类像
template<typename ...Args>
class X {
private:
std::tuple<std::array<Arg0, 255>, std::array<Arg1, 255>, ...> m_tuples; // For Arg in Args
}
Run Code Online (Sandbox Code Playgroud)
我知道这不是正确的C++,但是我怎样才能实现将类的参数包模板扩展到元组中保存的数组的效果?
Que*_*tin 11
template<typename ...Args>
class X {
private:
std::tuple<std::array<Args, 255>...> m_tuples; // For Arg in Args
};
Run Code Online (Sandbox Code Playgroud)
......你没想到会如此接近,你呢:)
| 归档时间: |
|
| 查看次数: |
638 次 |
| 最近记录: |