@@ -51,13 +51,17 @@ class RCLCPP_PUBLIC Duration
5151 // This constructor matches any std::chrono value other than nanoseconds
5252 // intentionally not using explicit to create a conversion constructor
5353 template <class Rep , class Period >
54+ // intentionally allow implicit conversions
5455 // cppcheck-suppress noExplicitConstructor
55- Duration (const std::chrono::duration<Rep, Period> & duration) // NOLINT(runtime/explicit)
56+ // NOLINTNEXTLINE(runtime/explicit, google-explicit-constructor)
57+ Duration (const std::chrono::duration<Rep, Period> & duration)
5658 : Duration(std::chrono::duration_cast<std::chrono::nanoseconds>(duration))
5759 {}
5860
61+ // intentionally allow implicit conversions
5962 // cppcheck-suppress noExplicitConstructor
60- Duration (const builtin_interfaces::msg::Duration & duration_msg); // NOLINT(runtime/explicit)
63+ // NOLINTNEXTLINE(runtime/explicit, google-explicit-constructor)
64+ Duration (const builtin_interfaces::msg::Duration & duration_msg);
6165
6266 // / Time constructor
6367 /* *
@@ -69,6 +73,8 @@ class RCLCPP_PUBLIC Duration
6973
7074 virtual ~Duration () = default ;
7175
76+ // intentionally allow implicit conversions
77+ // NOLINTNEXTLINE(google-explicit-constructor)
7278 operator builtin_interfaces::msg::Duration () const ;
7379
7480 // cppcheck-suppress operatorEq // this is a false positive from cppcheck
0 commit comments