
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