blob: d8256a6e10bf3935af97c1d00fe75e90b2793e1e (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#pragma once
#include <util/str_stl.h>
template <>
struct hash<TCowString>: ::NHashPrivate::TStringHash<char> {
};
template <>
struct hash<TUtf16CowString>: ::NHashPrivate::TStringHash<wchar16> {
};
template <>
struct hash<TUtf32CowString>: ::NHashPrivate::TStringHash<wchar32> {
};
template <>
struct TEqualTo<TCowString>: public TEqualTo<TStringBuf> {
using is_transparent = void;
};
template <>
struct TEqualTo<TUtf16CowString>: public TEqualTo<TWtringBuf> {
using is_transparent = void;
};
template <>
struct TEqualTo<TUtf32CowString>: public TEqualTo<TUtf32StringBuf> {
using is_transparent = void;
};
template <>
struct TCIEqualTo<TCowString> {
inline bool operator()(const TCowString& a, const TCowString& b) const {
return a.size() == b.size() && strnicmp(a.data(), b.data(), a.size()) == 0;
}
};
template <>
struct TLess<TCowString>: public TLess<TStringBuf> {
using is_transparent = void;
};
template <>
struct TLess<TUtf16CowString>: public TLess<TWtringBuf> {
using is_transparent = void;
};
template <>
struct TLess<TUtf32CowString>: public TLess<TUtf32StringBuf> {
using is_transparent = void;
};
template <>
struct TGreater<TCowString>: public TGreater<TStringBuf> {
using is_transparent = void;
};
template <>
struct TGreater<TUtf16CowString>: public TGreater<TWtringBuf> {
using is_transparent = void;
};
template <>
struct TGreater<TUtf32CowString>: public TGreater<TUtf32StringBuf> {
using is_transparent = void;
};
|