int64_t a = 1234; double d = (double) a;
Is this the recommended way?
You should use static_cast or rely on the implicit cast instead:
static_cast
int64_t a = 1234; double d = static_cast(a); double f = a;