Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12788: optional 1.63 no longer can be initialized from '<brace-enclosed initializer list>'
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-02-27 11:43:03
#12788: optional 1.63 no longer can be initialized from '<brace-enclosed
initializer list>'
-------------------------------+----------------------
Reporter: piotrwn1@⦠| Owner: akrzemi1
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: optional
Version: Boost 1.63.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+----------------------
Comment (by piotrwn1@â¦):
This is real problem, please do not close.
See this code:
{{{
#include <boost/optional.hpp>
#include <optional>
#include <iostream>
#define PRN(a) std::cout << #a "\n";
#define DEF(a, r) a { PRN(a); r }
struct Verbose {
DEF(Verbose(int,double),)
DEF(Verbose(),)
DEF(~Verbose(),)
DEF(Verbose(const Verbose&),)
DEF(Verbose(Verbose&&),)
DEF(Verbose& operator = (const Verbose&), return *this;)
DEF(Verbose& operator = (Verbose&&), return *this;)
};
using vbo = boost::optional<Verbose>;
using vso = std::optional<Verbose>;
int main() {
vbo bo;
vso so;
bo = {1,1.1}; // works for boost1.62, not for boost.1.63
so = {1,1.1}; // works for std::optional
}
}}}
Link do demo: http://melpon.org/wandbox/permlink/wDvuR7T9b7bI5fHq
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12788#comment:7> 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-27 11:46:53 UTC