Opened 14 years ago

Closed 14 years ago

#2724 closed Bugs (fixed)

extended_type_info_arg constructor calls base constructor with wrong argument

Reported by: kab@… Owned by: Robert Ramey
Milestone: Boost 1.39.0 Component: serialization
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc:

Description

In the file libs/serialization/src/extended_type_info.cpp, the constructor for the class extended_type_info_arg calls the base class constructor extended_type_info with an argument of NULL. The extended_type_info constructor takes an unsigned int argument, and NULL is not necessarily an unsigned int or even convertible to such. (See C.2.2.3 of C++98 standard.) Changing the argument to a constant 0 (or a named constant with that value) fixes the local problem, and doesn't conflict with either of the other existing classes derived from extended_type_info.

I noticed this problem in 1.38beta2, due to a warning on one of the platforms I'm using, but it looks like it's been this way "forever".

Change History (1)

comment:1 by Robert Ramey, 14 years ago

Milestone: Boost 1.38.0Boost 1.39.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.