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 Raffi Enficiaud, 5 years ago

Hi,

Does the code works as expected if you modify the reinterpret_cast to a static_cast ?

comment:2 by Raffi Enficiaud, 5 years ago

Any updates?

comment:3 by Raffi Enficiaud, 5 years ago

Kind reminder

comment:4 by Raffi Enficiaud, 5 years ago

Milestone: To Be DeterminedBoost 1.67.0
Owner: changed from Gennadiy Rozental to Raffi Enficiaud
Status: newassigned

comment:5 by Raffi Enficiaud, 5 years ago

Resolution: fixed
Status: assignedclosed

In master

Note: See TracTickets for help on using tickets.