Opened 16 months ago

Closed 7 months 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 Changed 15 months ago by Raffi Enficiaud

Hi,

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

comment:2 Changed 14 months ago by Raffi Enficiaud

Any updates?

comment:3 Changed 7 months ago by Raffi Enficiaud

Kind reminder

comment:4 Changed 7 months ago by Raffi Enficiaud

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

comment:5 Changed 7 months ago by Raffi Enficiaud

Resolution: fixed
Status: assignedclosed

In master

Note: See TracTickets for help on using tickets.