1
+ // Copyright 2025 Open Source Robotics Foundation, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
#include < gtest/gtest.h>
2
16
3
17
#include < chrono>
@@ -39,9 +53,8 @@ class CustomSubscription : public rclcpp::Subscription<
39
53
MessageT, AllocatorT, SubscribedT, ROSMessageT, MessageMemoryStrategyT>
40
54
{
41
55
public:
42
-
43
56
template <typename ... Args>
44
- CustomSubscription (Args &&...args) : rclcpp::Subscription<
57
+ explicit CustomSubscription (Args &&...args) : rclcpp::Subscription<
45
58
MessageT, AllocatorT, SubscribedT, ROSMessageT, MessageMemoryStrategyT>(
46
59
std::forward<Args>(args)...) {}
47
60
};
@@ -69,4 +82,4 @@ TEST_F(TestCreateSubscription, create) {
69
82
ASSERT_NE (nullptr , subscription);
70
83
EXPECT_STREQ (" /ns/topic_name" , subscription->get_topic_name ());
71
84
static_assert (std::is_same_v<std::decay_t <decltype (*subscription.get ())>, SubscriptionT>);
72
- }
85
+ }
0 commit comments