util/Intrusive*: add C++20 concept checks

This commit is contained in:
Max Kellermann
2022-12-01 15:02:39 +01:00
parent 253d551684
commit c7a0597fe7
4 changed files with 32 additions and 15 deletions

View File

@@ -33,6 +33,7 @@
#pragma once
#include "Cast.hxx"
#include "Concepts.hxx"
#include "MemberPointer.hxx"
#include "OptionalCounter.hxx"
#include "ShallowCopy.hxx"
@@ -198,8 +199,7 @@ public:
counter.reset();
}
template<typename D>
void clear_and_dispose(D &&disposer) noexcept {
void clear_and_dispose(Disposer<value_type> auto disposer) noexcept {
while (!empty()) {
auto *item = &front();
pop_front();