meta: allow for a smoother transition before dropping meta_associative_container::key_only
This commit is contained in:
@@ -119,6 +119,7 @@ public:
|
||||
storage = forward_as_any(instance);
|
||||
}
|
||||
|
||||
[[nodiscard]] inline bool key_only() const noexcept;
|
||||
[[nodiscard]] inline meta_type key_type() const noexcept;
|
||||
[[nodiscard]] inline meta_type mapped_type() const noexcept;
|
||||
[[nodiscard]] inline meta_type value_type() const noexcept;
|
||||
@@ -1861,6 +1862,14 @@ inline meta_sequence_container::iterator meta_sequence_container::erase(iterator
|
||||
return static_cast<bool>(storage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns true if a container is also key-only, false otherwise.
|
||||
* @return True if the associative container is also key-only, false otherwise.
|
||||
*/
|
||||
[[nodiscard]] inline bool meta_associative_container::key_only() const noexcept {
|
||||
return (mapped_type_node == nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the meta key type of a container.
|
||||
* @return The meta key type of the a container.
|
||||
|
||||
Reference in New Issue
Block a user