Opened 5 years ago
Closed 5 years ago
#13058 closed Bugs (fixed)
errors.hpp in Boost Test requires warning C4946 to be off
Reported by: | anonymous | Owned by: | Raffi Enficiaud |
---|---|---|---|
Milestone: | Boost 1.67.0 | Component: | test |
Version: | Boost 1.64.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hi all, when compiling the Boost Test library with MSVC 2015 and warning C4946 (reinterpret_cast between related types) set as an error, the build fails. The specific_param_error class uses reinterpret_cast in its operator functions (lines 89 and 99 in errors.hpp).
I am aware that this warning is off by default but at least suppress_warnings.hpp should list this warning. Also, a comment in the source why a reinterpret_cast was necessary in the first place, would be helpful.
Change History (5)
comment:1 by , 5 years ago
comment:4 by , 5 years ago
Milestone: | To Be Determined → Boost 1.67.0 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.
Hi,
Does the code works as expected if you modify the
reinterpret_cast
to astatic_cast
?