Boost C++ Libraries: Ticket #11763: boost_1_59_0/boost/serialization/array.hpp:54: missing return ? https://svn.boost.org/trac10/ticket/11763 <p> [boost_1_59_0/boost/serialization/array.hpp:54]: (error) No 'return' statement in non-void function causes undefined behavior. </p> <p> Source code is </p> <blockquote> <p> array &amp; operator=(const array &amp; rhs){ </p> <blockquote> <p> m_t = rhs.m_t; m_element_count = rhs.m_element_count; </p> </blockquote> <p> } </p> </blockquote> <p> I am surprised this even compiles. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11763 Trac 1.4.3 viboes Thu, 29 Oct 2015 10:37:48 GMT component changed; owner set https://svn.boost.org/trac10/ticket/11763#comment:1 https://svn.boost.org/trac10/ticket/11763#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Robert Ramey</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">serialization</span> </li> </ul> Ticket Robert Ramey Sun, 15 Nov 2015 07:09:41 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11763#comment:2 https://svn.boost.org/trac10/ticket/11763#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Turns out that this is never wrapper is never assigned - there's no need for it. So this function is never called. I replaced this function with private one so that any expected call will be trapped at compile time. </p> Ticket