[Boost-bugs] [Boost C++ Libraries] #10778: VC14 CTP4 Atomic don't compile with boost::chrono durations which are not TriviallyCopyable

Subject: [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-10 09:12:35


#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
 Keywords: |
------------------------------+---------------------
 This complete example does not compile in VC14 CTP4:

 {{{

 #include <atomic>
 #include <boost/chrono.hpp>

 std::atomic<boost::chrono::milliseconds> ms; // error C2338: atomic<T>
 requires T to be trivially copyable.

 }}}


 Using the standard library instead works as expected:


 {{{

 #include <atomic>
 #include <chrono>


 std::atomic<std::chrono::milliseconds> ms; // no error

 }}}


 The compiler is correct that boost::chrono::duration is not trivially
 copyable (as described on cppreference.com at least)
 but it seems (from looking at the code) that it's mostly concept check
 code used in
 constructors definitions that trigger the problem.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10778>
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