Skip to content

Commit 8bd1938

Browse files
Add documentation
1 parent e00a1ad commit 8bd1938

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

common/include/pcl/common/tuple.h

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ for_each_until_true(Tuple&& t, Function f, std::integral_constant<size_t, I>)
4848
*
4949
* \tparam Tuple The tuple to iterate through
5050
* \tparam Function A callable that is invoked for every tuple element and returns a
51-
* boolean indicating whether to coninute iteration or not
51+
* boolean indicating whether to continue iteration or not
5252
*
5353
* \remark Implementation taken from
5454
* https://stackoverflow.com/questions/26902633/how-to-iterate-over-a-stdtuple-in-c-11
@@ -72,14 +72,18 @@ struct tuple_contains_type_impl<T, std::tuple<Us...>>
7272
} // namespace detail
7373

7474
/**
75-
* \brief Checks whether a tuple contains a specified type
76-
*
77-
* \tparam T a type to check for
75+
* \brief If the \Tuple contains the type \p T then provides the member constant value
76+
* equal true. For any other type, value is false.
77+
* *
78+
* \tparam T a type to check
7879
* \tparam Tuple a tuple in which to check for the type
7980
*
8081
*/
8182
template <typename T, typename Tuple>
82-
using tuple_contains_type = typename detail::tuple_contains_type_impl<T, Tuple>::type;
83+
using tuple_contains_type = detail::tuple_contains_type_impl<T, Tuple>;
84+
85+
template <typename T, typename Tuple>
86+
constexpr bool tuple_contains_type_v = detail::tuple_contains_type_impl<T, Tuple>::value;
8387

8488
namespace detail {
8589

@@ -89,6 +93,14 @@ struct filter_tuple_values_impl {
8993
typename std::conditional<Predicate<TupleElements>::value, std::tuple<TupleElements>, std::tuple<>>::
9094
type()...));
9195

96+
/**
97+
* \brief Checks whether a tuple contains a specified type
98+
*
99+
* \tparam TupleElements the elments of the tuple you want to filter
100+
* \param std::tuple<TupleElements...> a tuple of the elements you want to filter
101+
* \return a tuple containing the filtered elements
102+
*
103+
*/
92104
auto
93105
operator()(const std::tuple<TupleElements...>& in)
94106
{
@@ -108,10 +120,10 @@ struct filter_tuple_values_impl {
108120
} // namespace detail
109121

110122
/**
111-
* \brief Filters elements of a tuple based on the predicate/condition
123+
* \brief Filters elements of \p Tuple based on the provided predicate/condition
112124
*
113125
* \tparam Predicate A trait which takes a tuple element as parameter and defines a
114-
* boolean member value which dictates whether to filter the tuple element or not
126+
* boolean member \p value which dictates whether to filter the tuple element or not
115127
* \tparam Tuple a tuple to filter
116128
*
117129
*/

common/include/pcl/experimental/executor/best_fit.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
namespace pcl {
2525
namespace executor {
2626

27+
/**
28+
* \brief One of the following executors is used when a user doesn't specify an
29+
* executor explicitly in an implementation supporting executors.
30+
*
31+
* It is used internally inside \ref enable_exec_on_desc_priority
32+
*/
2733
static const auto best_fit_executors = std::make_tuple(executor::omp_executor<>{},
2834
executor::sse_executor<>{},
2935
executor::inline_executor<>{});
@@ -121,7 +127,7 @@ struct executor_predicate {
121127
template <typename T>
122128
struct condition<T,
123129
std::enable_if_t<is_executor_instance_available_v<T> &&
124-
pcl::tuple_contains_type<T, Supported>::value>>
130+
pcl::tuple_contains_type_v<T, Supported>>>
125131
: std::true_type {};
126132
};
127133

0 commit comments

Comments
 (0)