Since per my previous request some C++ style literal constants (namely, nullptr, true, false) were introduced into Hex-Rays decompiler, I would also like to request something that would complement this, that is, C++ style casts.
So that
v2 = (uint)v1;
becomes
v2 = static_cast<uint>(v1);
And
ptr2 = (MyClass*)ptr1;
becomes
ptr2 = reinterpret_cast<MyClass*>(ptr1);
Also, as an extension, it would be nice to have C++ bit casting (since C++20) instead of IDA COERCE_ macros:
v2 = COERCE_FLOAT(v1);
→
v2 = std::bit_cast<float>(v1);
Or, to avoid dependency on when exporting pseudocode and forcing C++20 mode:
v2 = __builtin_bit_cast(float, v1);
Allowing bit cast can be a separate option from allowing C++ casts in hex-rays options.
Thanks!