Boost C++ Libraries: Ticket #13540: calling virtual function in constructor of `boost::detail::basic_pointerbuf` https://svn.boost.org/trac10/ticket/13540 <p> This is a duplicate of Issue <a class="ext-link" href="https://github.com/boostorg/lexical_cast/issues/23"><span class="icon">​</span>https://github.com/boostorg/lexical_cast/issues/23</a> . </p> <p> clang-tidy reports (while checking the code that uses <code>boost::lexical_cast</code>) a virtual function is called in the default constructor of class template <code>boost::detail::basic_pointerbuf</code>. (Function <code>setbuf()</code> 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 <code>setbuf()</code>. </p> <p> Here's the link to the offending call: <a class="ext-link" href="https://github.com/boostorg/lexical_cast/blob/develop/include/boost/detail/basic_pointerbuf.hpp#L42"><span class="icon">​</span>https://github.com/boostorg/lexical_cast/blob/develop/include/boost/detail/basic_pointerbuf.hpp#L42</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13540 Trac 1.4.3 Antony Polukhin Tue, 01 May 2018 19:45:19 GMT status, milestone changed https://svn.boost.org/trac10/ticket/13540#comment:1 https://svn.boost.org/trac10/ticket/13540#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.68.0</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/lexical_cast/commit/fb017f8b82617069fbd57ac248cde7590373b414"><span class="icon">​</span>https://github.com/boostorg/lexical_cast/commit/fb017f8b82617069fbd57ac248cde7590373b414</a> </p> Ticket Antony Polukhin Sun, 15 Jul 2018 12:40:53 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/13540#comment:2 https://svn.boost.org/trac10/ticket/13540#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket