Re: [Boost-bugs] [Boost C++ Libraries] #10149: boost::optional<T> can be constructed from a typed in place factory of the wrong type

Subject: Re: [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: 2016-03-15 12:24:35


#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
Resolution: | Keywords:
-------------------------------+-----------------------

Comment (by anonymous):

 Can you provide a short but complete example that demonstrates the
 problem?


 I can see that the following code does not even compile on GCC and Clang
 (which is desirable).

 {{{
 #include <boost/utility/in_place_factory.hpp>
 #include <boost/optional.hpp>

 int main()
 {
   boost::optional<char> oa = boost::in_place<double>(0);
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10149#comment:1>
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:19 UTC