Skip to content

Commit

Permalink
Adding some comments to clarify which constructors get matched.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Delsey committed Nov 12, 2018
1 parent 5d6a2a4 commit ddc1b93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rclcpp/include/rclcpp/duration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ class Duration
RCLCPP_PUBLIC
Duration(int32_t seconds, uint32_t nanoseconds);

// This constructor matches any numeric value - ints or floats
RCLCPP_PUBLIC
explicit Duration(rcl_duration_value_t nanoseconds);

// This constructor matches any std::chrono value
template<class rep, class period>
explicit Duration(std::chrono::duration<rep, period> duration)
{
Expand Down

0 comments on commit ddc1b93

Please sign in to comment.