summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-03-28 03:00:55 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-03-28 03:00:55 +0000
commita8b2b32342738aaba6dfc662df232a67729a6bdb (patch)
treed8ca5b2c446b6d4baa2f7d294abc080c17dd7e18
parentExpose size of each container by type (diff)
downloadilt-ptrs.tar.bz2
ilt-ptrs.tar.xz
ilt-ptrs.zip
Fix check for bulk removalptrs
-rw-r--r--lib/collection.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/collection.h b/lib/collection.h
index 22dcc52..1c77e1c 100644
--- a/lib/collection.h
+++ b/lib/collection.h
@@ -132,7 +132,7 @@ public:
removeAll()
{
auto removeAllFrom = [](auto & container) {
- if constexpr (std::is_base_of_v<T, decltype(std::to_address(container.front()))>) {
+ if constexpr (std::is_base_of_v<T, std::decay_t<decltype(*container.front())>>) {
const auto size = container.size();
container.clear();
return size;