Autoware.Auto
traits.hpp
Go to the documentation of this file.
1 // Copyright 2020 Apex.AI, Inc., Arm Limited
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 //
15 // Co-developed by Tier IV, Inc. and Apex.AI, Inc.
16 
19 
20 #ifndef COVARIANCE_INSERTION__TRAITS_HPP_
21 #define COVARIANCE_INSERTION__TRAITS_HPP_
22 
23 #include <type_traits>
24 
25 namespace autoware
26 {
27 namespace covariance_insertion
28 {
29 
30 template<typename T, typename = void>
31 struct has_covariance_member : std::false_type {};
32 
33 template<typename T>
34 struct has_covariance_member<T, decltype((void)T::covariance, void())>: std::true_type
35 {
36 };
37 
38 template<typename T, typename = void>
39 struct has_pose_member : std::false_type {};
40 
41 template<typename T>
42 struct has_pose_member<T, decltype((void)T::pose, void())>: std::true_type
43 {
44 };
45 
46 template<typename T, typename = void>
47 struct has_twist_member : std::false_type {};
48 
49 template<typename T>
50 struct has_twist_member<T, decltype((void)T::twist, void())>: std::true_type
51 {
52 };
53 
54 } // namespace covariance_insertion
55 } // namespace autoware
56 
57 #endif // COVARIANCE_INSERTION__TRAITS_HPP_
autoware::covariance_insertion::has_twist_member
Definition: traits.hpp:47
autoware
This file defines the lanelet2_map_provider_node class.
Definition: quick_sort.hpp:24
autoware::covariance_insertion::has_pose_member
Definition: traits.hpp:39
autoware::covariance_insertion::has_covariance_member
Definition: traits.hpp:31