C++/WinRT
2 articles in the last 30 days.
-
On forcing all derived classes to implement a specific non-virtual method, part 2
Raymond Chen shows how deleting a base-class method yields clearer compiler errors for derived classes that skip it, and notes C++26 custom deleted-function messages and the technique's limits in C++/WRL.
-
On Forcing All Derived Classes to Implement a Specific Non-Virtual Method, Part 1
Shows how to require derived classes to implement a method by leaving it unimplemented in the base class. Examples in C++/WRL, C++/WinRT and plain C++ make missing implementations fail at compile time.