Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Replace
bit_cast<HANDLE>
calls with reinterpret_cast<HANDLE>
It appears that commit 548b45f ("BUG: Replace C-style casts from `_beginthreadex` with `bit_cast<HANDLE>`", from pull request #3380) was wrong: `bit_cast<HANDLE>` might do a different conversion than the corresponding C-style cast, `(HANDLE)`. The C-style cast `(HANDLE)` behaves exactly like `reinterpret_cast<HANDLE>`, by definition. `reinterpret_cast<HANDLE>` does an implementation-defined conversion, as was explained by Jonathan Wakely at isocpp/CppCoreGuidelines#1517 (comment) (issue "Favor bit_cast over reinterpret_cast"). Fixed by replacing all `bit_cast<HANDLE>` calls with `reinterpret_cast<HANDLE>`.
- Loading branch information