tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: EV_SET() better C++ compat with alternative implementations



On Sun, Aug 18, 2019 at 08:58:15PM -0000, Valery Ushakov wrote:
> Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
> 
> > On Sun, Aug 18, 2019 at 05:05:33PM +0200, Kamil Rytarowski wrote:
> >> Ping? Can we switch from intptr_t to void*?
> > 
> > Can we just go back to the original state?
> 
> Anything wrong with the templated solution for c++11 I posted a few
> days ago, keeping the original state for older c++ versions (since
> nullptr that, afaiu, started all this is only in 11).

I'm kind of waiting for the next obscure fallout. The original version
has easy to understand handling. It works without cast for one common
use case (passing indices) and needs a reinterpret_cast in the other
(passing pointers). Now we are trying to do both and play whack-a-mole.
There is no technical reason really for prefering void * and in fact a
couple of them for prefer a plain integer. Lack of potential trap
representations for example. I maintain that going back to the original
state is actually the better situation.

Joerg


Home | Main Index | Thread Index | Old Index