aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/comptrie/key_selector.h
blob: 60466cef7158f43bd4cd6a26d9bc6a86dab56cfe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once

#include <util/generic/vector.h>
#include <util/generic/string.h>
#include <util/generic/strbuf.h>

template <class T>
struct TCompactTrieKeySelector {
    typedef TVector<T> TKey;
    typedef TVector<T> TKeyBuf;
};

template <class TChar>
struct TCompactTrieCharKeySelector {
    typedef TBasicString<TChar> TKey;
    typedef TBasicStringBuf<TChar> TKeyBuf;
};

template <>
struct TCompactTrieKeySelector<char>: public TCompactTrieCharKeySelector<char> {
};

template <>
struct TCompactTrieKeySelector<wchar16>: public TCompactTrieCharKeySelector<wchar16> {
};

template <>
struct TCompactTrieKeySelector<wchar32>: public TCompactTrieCharKeySelector<wchar32> {
};