saprse_set: deprecate .at as ambiguous

This commit is contained in:
Michele Caini
2024-01-01 16:39:33 +01:00
parent f20abd5767
commit 776c541d1c

View File

@@ -754,7 +754,7 @@ public:
* @param pos The position for which to return the entity.
* @return The entity at specified location if any, a null entity otherwise.
*/
[[nodiscard]] entity_type at(const size_type pos) const noexcept {
[[deprecated("use .begin()[pos] instead")]] [[nodiscard]] entity_type at(const size_type pos) const noexcept {
return pos < packed.size() ? packed[pos] : null;
}