From 0521180c61e7d8970f164f3154599e49800e85c6 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 2 May 2022 21:40:36 +0300 Subject: Autocommit at 02.05.2022 @ 21:40 --- src/List/List.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/List/List.cpp') diff --git a/src/List/List.cpp b/src/List/List.cpp index d5c2f04..d455c04 100644 --- a/src/List/List.cpp +++ b/src/List/List.cpp @@ -71,6 +71,11 @@ unsigned List::findIndex(const T& element) const { return ind; } +template +bool List::contain(const T& element) const { + return findIndex(element) < count; +} + template T& List::operator[](unsigned index) { return elements[index]; -- cgit v1.3.1-26-gb76a