Skip to content

Commit

Permalink
UnorderedMap: promote invalid_index to public and use `Experiment…
Browse files Browse the repository at this point in the history
…al::finite_max_v` for its value
  • Loading branch information
romintomasetti committed Dec 4, 2023
1 parent a41dba5 commit d202f04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion containers/src/Kokkos_UnorderedMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ class UnorderedMap {
static constexpr bool is_modifiable_map = has_const_key && !has_const_value;
static constexpr bool is_const_map = has_const_key && has_const_value;

static constexpr size_type invalid_index = Experimental::finite_max_v<size_type>;

using insert_result = UnorderedMapInsertResult;

using HostMirror =
Expand All @@ -263,7 +265,6 @@ class UnorderedMap {
//@}

private:
enum : size_type { invalid_index = ~static_cast<size_type>(0) };

using impl_value_type = std::conditional_t<is_set, int, declared_value_type>;

Expand Down

0 comments on commit d202f04

Please sign in to comment.