peaclock
peaclock copied to clipboard
error: non-constant-expression cannot be narrowed from type 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1> >::rep' (aka 'long long') to 'long' in initializer list
http://beefy17.nyi.freebsd.org/data/head-i386-default/p529299_s359382/logs/peaclock-0.4.1.log (IPv6 URL)
clang-8 errors:
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:86:25: error: non-constant-expression cannot be narrowed from type 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1> >::rep' (aka 'long long') to 'long' in initializer list [-Wc++11-narrowing]
long int const now {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:86:25: note: insert an explicit cast to silence this issue
long int const now {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<long>( )
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:108:26: error: non-constant-expression cannot be narrowed from type 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1> >::rep' (aka 'long long') to 'long' in initializer list [-Wc++11-narrowing]
long int const diff {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:108:26: note: insert an explicit cast to silence this issue
long int const diff {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<long>( )
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:120:26: error: non-constant-expression cannot be narrowed from type 'std::__1::chrono::duration<long long, std::__1::ratio<1, 1> >::rep' (aka 'long long') to 'long' in initializer list [-Wc++11-narrowing]
long int const diff {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/deskutils/peaclock/work/peaclock-0.4.1/./src/ob/timer.hh:120:26: note: insert an explicit cast to silence this issue
long int const diff {std::chrono::time_point_cast<std::chrono::seconds>(_total).time_since_epoch().count()};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<long>( )
3 errors generated.
Thanks for letting me know, I appreciate it! It should be fixed with 67b30d7.