Modify

Opened 6 months ago

Last modified 5 months ago

#13058 new Bugs

errors.hpp in Boost Test requires warning C4946 to be off

Reported by: anonymous Owned by: Gennadiy Rozental
Milestone: To Be Determined 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.

Attachments (0)

Change History (2)

comment:1 Changed 6 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 5 months ago by Raffi Enficiaud

Any updates?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Gennadiy Rozental.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.