
6 Nov
2008
6 Nov
'08
4:29 p.m.
Mathias Gaunard skrev:
Sebastian Redl wrote:
That approach seems like bloat. Couldn't polymorphic_cast and polymorphic_downcast be overloaded?
How is that less bloat?
Having all of any_cast (dynamic_cast which always throws on error), any_unsafe_cast (static_cast), any_downcast (static_cast with debug checks) and finally any_test_cast (dynamic cast that can return null) doesn't seem like bloat to you?
I only suggested to have two. For a majority of cases, static_cast can be replaced with XX_dowcast() that does a debug check. -Thorsten