POV-Ray : Newsgroups : povray.off-topic : C/C++ Data Type Ambiguity Backwards : Re: Platform with non-8-bit bytes Server Time
8 Jul 2024 08:38:26 EDT (-0400)
  Re: Platform with non-8-bit bytes  
From: Warp
Date: 3 Sep 2015 05:52:19
Message: <55e81853@news.povray.org>
Orchid Win7 v1 <voi### [at] devnull> wrote:
> I saw an FAQ page somewhere that had examples of systems where the size 
> of a pointer really does change depending on what it points to.

Many C programmers assume that you can convert any pointer to void*
and back, as they assume that all pointers have the same size.

In C++ you can't always make that assumption. More precisely, a pointer
to a virtual function is (most probably) larger than a regular function
pointer. A pointer-to-virtual-function cannot be converted to void* and
back without malfunction.

-- 
                                                          - Warp


Post a reply to this message

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