Autoware.Auto
template_utils.hpp
Go to the documentation of this file.
1
// Copyright 2021 the Autoware Foundation
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
17
#ifndef HELPER_FUNCTIONS__TEMPLATE_UTILS_HPP_
18
#define HELPER_FUNCTIONS__TEMPLATE_UTILS_HPP_
19
20
#include <
common/types.hpp
>
21
#include <type_traits>
22
23
namespace
autoware
24
{
25
namespace
common
26
{
27
namespace
helper_functions
28
{
33
template
<
template
<
typename
...>
class
ExpressionTemplate,
typename
T
,
typename
=
void
>
34
struct
expression_valid
: std::false_type {};
35
40
template
<
template
<
typename
...>
class
ExpressionTemplate,
typename
T
>
41
struct
expression_valid
<ExpressionTemplate,
T
,
42
types::
void_t
<ExpressionTemplate<T>>>: std::true_type {};
43
49
template
<
template
<
typename
...>
class
ExpressionTemplate,
typename
T
,
typename
ReturnT,
50
typename
=
void
>
51
struct
expression_valid_with_return
: std::false_type {};
52
58
template
<
template
<
typename
...>
class
ExpressionTemplate,
typename
T
,
typename
ReturnT>
59
struct
expression_valid_with_return
<ExpressionTemplate,
T
, ReturnT,
60
std::enable_if_t<std::is_same<ReturnT,
61
ExpressionTemplate<T>>::value>>: std::true_type {};
62
63
64
}
// namespace helper_functions
65
}
// namespace common
66
}
// namespace autoware
67
#endif // HELPER_FUNCTIONS__TEMPLATE_UTILS_HPP_
autoware::common::types::void_t
void void_t
`stdvoid_t<> implementation
Definition:
types.hpp:111
autoware::common::helper_functions::expression_valid_with_return
Definition:
template_utils.hpp:51
catr_diff.T
T
Definition:
catr_diff.py:22
types.hpp
This file includes common type definition.
autoware
This file defines the lanelet2_map_provider_node class.
Definition:
quick_sort.hpp:24
autoware::common::helper_functions::expression_valid
Definition:
template_utils.hpp:34