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: | 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 , 7 years ago
Component: | None → serialization |
---|---|
Owner: | set to |
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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.