Hi
I don't understand your ex: 
If you clone a list of Object you'll get...a list of Object...you can't forsee 
their type...
Further why don't u static cast when you're sure of the return type?...



hartwigw wrote:
> Hi,
> 
> if you have a list of pointer of derived classes from osg::Object and you 
> would like to clone them you always have to cast them. And I like to prevent 
> casts as often as possible.
> 
> Example: if you clone a StateAttribute you get back a pointer to an Object 
> although you know (and the compiler could also know) that the result is a 
> StateAttribute.
> 
> Cheers,
> Hartwig


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72462#72462





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to