Opened 7 years ago

Closed 7 years ago

#11763 closed Bugs (fixed)

boost_1_59_0/boost/serialization/array.hpp:54: missing return ?

Reported by: David Binderman <dcb314@…> Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc: dcb314@…

Description

[boost_1_59_0/boost/serialization/array.hpp:54]: (error) No 'return' statement in non-void function causes undefined behavior.

Source code is

array & operator=(const array & rhs){

m_t = rhs.m_t; m_element_count = rhs.m_element_count;

}

I am surprised this even compiles.

Change History (2)

comment:1 by viboes, 7 years ago

Component: Noneserialization
Owner: set to Robert Ramey

comment:2 by Robert Ramey, 7 years ago

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.