Opened 4 years ago

Closed 4 years ago

#13540 closed Bugs (fixed)

calling virtual function in constructor of `boost::detail::basic_pointerbuf`

Reported by: akrzemi1 Owned by: Antony Polukhin
Milestone: Boost 1.68.0 Component: lexical_cast
Version: Boost 1.65.0 Severity: Problem
Keywords: Cc:

Description

This is a duplicate of Issue https://github.com/boostorg/lexical_cast/issues/23 .

clang-tidy reports (while checking the code that uses boost::lexical_cast) a virtual function is called in the default constructor of class template boost::detail::basic_pointerbuf. (Function setbuf() is declared virtual in base class.) This might be an indication of a bug. If not, I would recommend using a different construct that avoids confusion, for instance declaring the function override final in newer versions of C++, or providing another function with different name but with the same semantics as the overriding setbuf().

Here's the link to the offending call: https://github.com/boostorg/lexical_cast/blob/develop/include/boost/detail/basic_pointerbuf.hpp#L42

Change History (2)

comment:1 by Antony Polukhin, 4 years ago

Milestone: To Be DeterminedBoost 1.68.0
Status: newassigned

comment:2 by Antony Polukhin, 4 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.