VC14 CTP4 Atomic don't compile with boost::chrono durations which are not TriviallyCopyable

I was testing my code with VC14 and found this issue.
I'm just not sure what to do about it, should I consider it a bug of
Boost.Chrono or not?
This complete example does not compile in VC14 CTP4:
#include <atomic>
#include

I forgot to add: I'm using Boost 1.57.0 (which compiled fine with VC14 as expected, good work!)

Le 07/11/14 00:32, Klaim - Joël Lamotte a écrit :
I was testing my code with VC14 and found this issue. I'm just not sure what to do about it, should I consider it a bug of Boost.Chrono or not?
This complete example does not compile in VC14 CTP4:
#include <atomic> #include
std::atomicboost::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::atomicstd::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. So I'm not sure if it should be fixed or not or what to do with this info.
Hi, please be free to create a ticket so that we don't forget it. When we developed chrono, we don't had C++11 compilers. Best, Vicente

On Mon, Nov 10, 2014 at 1:33 AM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
Hi,
please be free to create a ticket so that we don't forget it. When we developed chrono, we don't had C++11 compilers.
Ok, it's done: https://svn.boost.org/trac/boost/ticket/10778
Best, Vicente
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
participants (2)
-
Klaim - Joël Lamotte
-
Vicente J. Botet Escriba