double**
is incompatible with double*
. The conversion is legal, but the only thing you can do with the results is cast it back. This seems more or less obvious: on a 32 bit machine, a double*
won't even have the same size as a double
.
But your example doesn't convert a double*
to double**
. It creates a new double**
, which points to the double*
. This is fine.