[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: mi_cast
From: Scott Wheeler <wheeler () kde ! org>
Date: 2003-10-02 11:19:27
[Download RAW message or body]
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 <class From, class To> To mi_cast(From v)
{
return dynamic_cast<To>(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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic