base: add util/dictionary.h utility

The new 'Dictionary' provides an easy way to access objects using
strings as key. The 'String' received the 'operator >' to simplify the
organization of strings in an AVL tree.

The patch removes the former definition of the 'operator >' from the
platform driver because it would be ambigious now.

Fixes #4610
This commit is contained in:
Norman Feske
2022-09-14 15:35:13 +02:00
parent 6df66a77d0
commit 3be0136901
4 changed files with 154 additions and 12 deletions

View File

@@ -22,12 +22,6 @@ namespace Trace_recorder {
using namespace Genode;
template <typename T> class Named_registry;
template <size_t N1, size_t N2>
static inline bool operator > (String<N1> const &s1, String<N2> const &s2)
{
return strcmp(s1.string(), s2.string()) > 0;
}
}
template <typename T>