POV-Ray : Newsgroups : povray.off-topic : Standard libraries : Re: Standard libraries Server Time
9 Oct 2024 14:38:12 EDT (-0400)
  Re: Standard libraries  
From: Nicolas Alvarez
Date: 8 Mar 2009 19:56:17
Message: <49b45b20@news.povray.org>
"Fredrik Eriksson" <fe79}--at--{yahoo}--dot--{com> wrote:
> No. A failed dynamic_cast of a pointer simply returns a null pointer. Only
> failed casts of a reference result in a std::bad_cast exception.

Thanks for that. I first thought it returned null, but then I searched the
Internets and saw a try { ... } catch(std::bad_cast), so I thought I was
wrong. I didn't notice the difference was that the example I found used
references :)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.