Skip to content

Commit

Permalink
Merge pull request #4205 from haritha-j/unsigned_index
Browse files Browse the repository at this point in the history
[common] Add always-unsigned index type `uindex_t` dependent on `index_t`
  • Loading branch information
SergioRAgostinho authored Jun 19, 2020
2 parents 7004787 + 1a9b8e2 commit ddf215e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions common/include/pcl/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ namespace pcl
using index_t = detail::int_type_t<detail::index_type_size, detail::index_type_signed>;
static_assert(!std::is_void<index_t>::value, "`index_t` can't have type `void`");

/**
* \brief Type used for an unsigned index in PCL
*
* Unsigned index that mirrors the type of the index_t
*/
using uindex_t = detail::int_type_t<detail::index_type_size, false>;
static_assert(!std::is_signed<uindex_t>::value, "`uindex_t` must be unsigned");

/**
* \brief Type used for indices in PCL
* \todo Remove with C++20
Expand Down

0 comments on commit ddf215e

Please sign in to comment.