14 Feb
                
                    2010
                
            
            
                14 Feb
                
                '10
                
            
            
            
        
    
                6:35 p.m.
            
        Zitat von "vicente.botet" <vicente.botet@wanadoo.fr>:
B* ptr; ptr= new D(); D* dPtr = downcast<D*>(ptr); // uses static_cast as is_virtual_base_of<B,D>::type is false
ptr= new DV(); DV* dPtr = downcast<DV*>(ptr); // uses dynamic_cast as is_virtual_base_of<B,DV>::type is true
What would be a good name for this downcast function?
http://www.boost.org/doc/libs/1_42_0/libs/serialization/doc/smart_cast.html