[英]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.