討論串[問題] compile time array initialization?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者holydc (のヮの)時間11年前 (2014/11/11 23:00), 編輯資訊
0
0
4
內容預覽:
自己回一下. 後來找到這篇 http://goo.gl/HwKtMA. ( http://www.macieira.org/blog/2011/07/. initialising-an-array-with-cx0x-using-constexpr-and-variadic-templates/ )
(還有287個字)

推噓3(3推 0噓 3→)留言6則,0人參與, 最新作者holydc (のヮの)時間11年前 (2014/11/11 17:24), 編輯資訊
0
0
1
內容預覽:
大家好. 有些簡單而且固定的運算,我想透過 template 遞迴在編譯期算出值,例如. template<unsigned int N>. struct PowerOfTen {. static_assert(N < 20U, "Too large");. constexpr static con
(還有726個字)
首頁
上一頁
1
下一頁
尾頁