On forcing all derived classes to implement a specific non-virtual method, part 1 -- Raymond Chen
How can you ensure a derived C++ class implements a required method without relying on comments or runtime assertions? This article explores a simpler approach—leaving the method unimplemented in the base class—and demonstrates how C++/WRL, C++/WinRT, and plain C++ catch missing implementations at…
Sources
- T1On forcing all derived classes to implement a specific non-virtual method, part 1 -- Raymond ChenLanguage blogs: Rust / Go / TypeScript / Swift / Kotlin / Java / .NET / Ruby / PHP / Elixir / ISO C++