Subject: [Boost-bugs] [Boost C++ Libraries] #10149: boost::optional<T> can be constructed from a typed in place factory of the wrong type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-06-25 16:54:48
#10149: boost::optional<T> can be constructed from a typed in place factory of the
wrong type
------------------------------+-----------------------
Reporter: aastolfi@⦠| Owner: fcacciola
Type: Bugs | Status: new
Milestone: To Be Determined | Component: optional
Version: Boost 1.49.0 | Severity: Problem
Keywords: |
------------------------------+-----------------------
For example:
boost::optional<char> oa = boost::in_place<double>(0); // type-checks but
results in runtime undefined behavior, placement new of double in a buffer
of size char.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10149> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC