[英]C++ expand parameter pack to tuple of arrays
我想类似实例化一个类
template<typename ...Args>
class X {
private:
std::tuple<std::array<Arg0, 255>, std::array<Arg1, 255>, ...> m_tuples; // For Arg in Args
}
我知道这不是正确的C ++,但是我怎样才能实现将类的参数包模板扩展到元组中保存的数组的效果?
template<typename ...Args>
class X {
private:
std::tuple<std::array<Args, 255>...> m_tuples; // For Arg in Args
};
......你没想到会如此接近,你呢:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.