From kde-core-devel Thu Oct 02 11:19:27 2003 From: Scott Wheeler Date: Thu, 02 Oct 2003 11:19:27 +0000 To: kde-core-devel Subject: mi_cast X-MARC-Message: https://marc.info/?l=kde-core-devel&m=106509369529311 After a few recent threads on kde-cvs I've come to wonder if a simple define in one of the KDE headers would be of some utility -- Specifically I'd like to add a: #define mi_cast dynamic_cast Alternatively something like: template To mi_cast(From v) { return dynamic_cast(v); } Should work, but I think would be less semantically nice... Or something similar -- whatever -- we simply have the problem that a lot of people don't know how to use dynamic_cast and when reading through sources you often hit false positives where it was actually someone using a dynamic_cast to cast "sideways" across a multiple inheritance hierarchy. It would be nice if we had a "I know what I'm doing" indicator of sorts. Thoughts? Flames? -Scott -- There are 10 types of people in the world: Those who understand binary, and those who don't.