Opened 4 years ago

#13551 new Bugs

m_storage may be used uninitialized in this function

Reported by: lukasz.czajczyk@… Owned by: Fernando Cacciola
Milestone: To Be Determined Component: optional
Version: Boost 1.66.0 Severity: Regression
Keywords: Cc:

Description

Hi, in 1.66 was the following feature introduced: On newer compilers optional is now trivially-copyable for scalar Ts. This uses a different storage (just T rather than aligned_storage). We require the compiler to support defaulted functions.

Gcc 4.4.7 in C++98 mode is incorrectly recognizes because Boost tries to use tc_optional_base however without C++11 defaulted functions are not working. This is causing boost::optional<unsigned char>::<anonymous>.boost::optional_detail::tc_optional_base<unsigned char>::m_storage’ may be used uninitialized in this function warning.

Change History (0)

Note: See TracTickets for help on using tickets.