Infinite Loop
  • Home

C++

A collection of 1 post

C++

Policy-Based Class Design

《Modern C++ Design》第一章讀書筆記 問題 軟體設計中,常會有所謂的「constraints」(譬如說,你想限制某個 class 無法建立兩個或以上的 object)。理想中,應該要在 compile time 達成大多數的 constraints。 而要將所有的 constraints 一併實作在所謂的 do-it-all interface 則缺乏彈性。譬如說,一個徹底封裝 threading 實作的 thread-safe singleton 到了另一個特殊且不可移植的 threading

Chi-En Wu Chi-En Wu
Infinite Loop © 2021
Latest Posts Ghost