Hello,
can someone explain me if there are differences in execution speed between following 3:
int a=3;
size_t b=(size_t)a;
size_t b=size_t(a);
size_t b=static_cast<size_t>(a);
I am pretty much sure that there is no difference between #1 and #3. But for #2, doesn't that add an overhead because of the constructor?
And what about following example?
unsigned char* a=aRandomBuffer;
float b=((float*)a)[0];
float b=(reinterpret_cast<float*>(a))[0];
Thanks for any insight!