ros / roscpp_core

ros distribution sandbox
89 stars 116 forks source link

No matching conversion from 'double' to 'pt::microseconds' #84

Closed mbreyer closed 6 years ago

mbreyer commented 6 years ago

When compiling the rostime package on my machine, I get the following compiler error:

/Users/michel/Developer/kinetic_ws/src/roscpp_core/rostime/include/ros/impl/time.h:170:35: error: no matching conversion for functional-style cast from 'double' to 'pt::microseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000000>')
    return pt::from_time_t(sec) + pt::microseconds(nsec/1000.0);

Adding an explicit cast to either int32_t or uint32_t seems to solve this issue.

My setup

dirk-thomas commented 6 years ago

Please provide a pull request with the proposed patch.

mikaelarguedas commented 6 years ago

@dirk-thomas It looks like #79 addresses this issue

dirk-thomas commented 6 years ago

Addressed by #79.