Related articles |
---|
Implementation of static_cast<> bgera@hotmail.com (2002-01-14) |
Re: Implementation of static_cast<> alainm@cup.hp.com (Alain Miniussi) (2002-01-17) |
Re: Implementation of static_cast<> vbdis@aol.com (2002-01-17) |
From: | bgera@hotmail.com (Bond) |
Newsgroups: | comp.compilers |
Date: | 14 Jan 2002 02:00:59 -0500 |
Organization: | http://groups.google.com/ |
Keywords: | C++, question |
Posted-Date: | 14 Jan 2002 02:00:59 EST |
Hi:
Im curious to know the implementation of static_cast<> by the C++ compiler.
Since it is a better version than "C" style casts...
I assume something like:
1) try to get the type of the non-polymorphic object. something like "typeid()"
2) try to match the given pointer/type to the type of the template parameter
3) If success return after casting ( "C" style ? ) else return null.
Any thoughts?
bharat
Return to the
comp.compilers page.
Search the
comp.compilers archives again.