I get a following compiler (vs2012) error:
Error 3 error C2679: binary '+=' : no operator found which takes a right-hand operand of type 'const std::chrono::duration<_Rep,_Period>' (or there is no acceptable conversion) c:\program files (x86)\microsoft visual studio 11.0\vc\include\chrono 749
My definition of duration is:
// Tick interval type in nanoseconds
typedef std::chrono::duration<double, std::ratio<1, 100000000>> tick_interval_type;
Same error when I use float... It only compiles when the Rep type of duration is integer.
Can someone please help?
Edit (more complete log from Output):
c:\program files (x86)\microsoft visual studio 11.0\vc\include\chrono(749): error C2679: binary '+=' : no operator found which takes a right-hand operand of type 'const std::chrono::duration<_Rep,_Period>' (or there is no acceptable conversion) with [ _Rep=double, _Period=std::nano ] c:\program files (x86)\microsoft visual studio 11.0\vc\include\chrono(166): could be 'std::chrono::duration<_Rep,_Period> &std::chrono::duration<_Rep,_Period>::operator +=(const std::chrono::duration<_Rep,_Period> &)' with [ _Rep=__int64, _Period=std::nano ] while trying to match the argument list '(std::chrono::nanoseconds, const std::chrono::duration<_Rep,_Period>)' with [ _Rep=double, _Period=std::nano ] c:\program files (x86)\microsoft visual studio 11.0\vc\include\thread(164) : see reference to function template instantiation 'xtime std::_To_xtime(const std::chrono::duration<_Rep,_Period> &)' being compiled with [ _Rep=double, _Period=std::nano ] c:\dev\projects\revolverx\classes\ticker.h(78) : see reference to function template instantiation 'void std::this_thread::sleep_for(const std::chrono::duration<_Rep,_Period> &)' being compiled with [ _Rep=double, _Period=std::nano ]