Clang: Helper function to get token IconType

Change-Id: I9de562102eded9391ab0d6b895b8d812e259efd6
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-02-09 13:51:39 +01:00
parent 9a3dff8934
commit 524d3ea28b
3 changed files with 117 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
#pragma once
#include <algorithm>
#include <array>
#include <cstdint>
#include <ostream>
@@ -110,6 +111,13 @@ public:
std::array<T, MaxSize>::fill(T{});
}
bool contains(const T &item) const
{
return std::any_of(begin(), end(), [&item](const T &current) {
return item == current;
});
}
friend std::ostream &operator<<(std::ostream &out, SizedArray array)
{
out << "[";