[Boost-bugs] [Boost C++ Libraries] #13540: calling virtual function in constructor of `boost::detail::basic_pointerbuf`

Subject: [Boost-bugs] [Boost C++ Libraries] #13540: calling virtual function in constructor of `boost::detail::basic_pointerbuf`
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-04-25 14:25:34


#13540: calling virtual function in constructor of
`boost::detail::basic_pointerbuf`
------------------------------+-----------------------------
 Reporter: akrzemi1 | Owner: Antony Polukhin
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: lexical_cast
  Version: Boost 1.65.0 | Severity: Problem
 Keywords: |
------------------------------+-----------------------------
 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

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13540>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-04-25 14:32:06 UTC