Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10778: VC14 CTP4 Atomic don't compile with boost::chrono durations which are not TriviallyCopyable
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-11 14:49:11
#10778: VC14 CTP4 Atomic don't compile with boost::chrono durations which are not
TriviallyCopyable
-------------------------------+---------------------
Reporter: mjklaim@⦠| Owner: viboes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
Version: Boost 1.57.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------
Comment (by viboes):
The problem is at least on the default constructor.
I added the default initialization as zero, but this is not correct.
Please, could you try the following
{{{
#if defined BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
BOOST_FORCEINLINE BOOST_CONSTEXPR
duration() : rep_(duration_values<rep>::zero()) { }
#else
duration() BOOST_NOEXCEPT = default;
#endif
}}}
You would surely need
{{{
#if defined BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
duration& operator=(const duration& rhs) // = default;
{
if (&rhs != this) rep_= rhs.rep_;
return *this;
}
#else
duration& operator=(const duration& rhs) = default;
#endif
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10778#comment:2> 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:17 UTC