討論串[問題] compile time array initialization?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
自己回一下. 後來找到這篇 http://goo.gl/HwKtMA. ( http://www.macieira.org/blog/2011/07/. initialising-an-array-with-cx0x-using-constexpr-and-variadic-templates/ )
(還有287個字)
內容預覽:
大家好. 有些簡單而且固定的運算,我想透過 template 遞迴在編譯期算出值,例如. template<unsigned int N>. struct PowerOfTen {. static_assert(N < 20U, "Too large");. constexpr static con
(還有726個字)
首頁
上一頁
1
下一頁
尾頁