sparse set: drop deprecated members

This commit is contained in:
Michele Caini
2024-10-24 12:51:17 +02:00
parent bf0bde8a64
commit 6405aece3a
2 changed files with 1 additions and 17 deletions

View File

@@ -1052,24 +1052,9 @@ public:
* @brief Forwards variables to derived classes, if any.
* @tparam Type Type of the element to forward.
* @param value The element to forward.
* @return Nothing.
*/
template<typename Type>
[[deprecated("avoid wrapping elements with basic_any")]] std::enable_if_t<std::is_same_v<std::remove_const_t<std::remove_reference_t<Type>>, basic_any<>>>
bind(Type &&value) noexcept {
// backward compatibility
bind_any(std::forward<Type>(value));
}
/**
* @brief Forwards variables to derived classes, if any.
* @tparam Type Type of the element to forward.
* @param value The element to forward.
* @return Nothing.
*/
template<typename Type>
std::enable_if_t<!std::is_same_v<std::remove_const_t<std::remove_reference_t<Type>>, basic_any<>>>
bind(Type &&value) noexcept {
void bind(Type &&value) noexcept {
bind_any(forward_as_any(std::forward<Type>(value)));
}

View File

@@ -442,7 +442,6 @@ TYPED_TEST(SparseSet, Bind) {
sparse_set_type set{policy};
ASSERT_NO_THROW(set.bind(0));
ASSERT_NO_THROW(set.bind(entt::make_any<int>(0)));
}
}