From a57600831cb7046bafd752fc1c79310625b61096 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 3 Apr 2024 18:14:01 +0200 Subject: [PATCH] util/IntrusiveSortedList: remove unused class --- src/util/IntrusiveSortedList.hxx | 41 -------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 src/util/IntrusiveSortedList.hxx diff --git a/src/util/IntrusiveSortedList.hxx b/src/util/IntrusiveSortedList.hxx deleted file mode 100644 index 4cef8c09..00000000 --- a/src/util/IntrusiveSortedList.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: BSD-2-Clause -// author: Max Kellermann - -#pragma once - -#include "IntrusiveList.hxx" - -#include // for std::find_if() - -/** - * A variant of #IntrusiveList which is sorted automatically. There - * are obvious scalability problems with this approach, so use with - * care. - */ -template, - IntrusiveListOptions options=IntrusiveListOptions{}> -class IntrusiveSortedList - : public IntrusiveList -{ - using Base = IntrusiveList; - - [[no_unique_address]] - Compare compare; - -public: - constexpr IntrusiveSortedList() noexcept = default; - IntrusiveSortedList(IntrusiveSortedList &&src) noexcept = default; - - using typename Base::reference; - using Base::begin; - using Base::end; - - void insert(reference item) noexcept { - auto position = std::find_if(begin(), end(), [this, &item](const auto &other){ - return !compare(other, item); - }); - - Base::insert(position, item); - } -};