1 parent 0d8ebc1 commit 5bd7669Copy full SHA for 5bd7669
1 file changed
header_utils.h
@@ -35,15 +35,16 @@ template<int N>
35
consteval cchar_decay_string<N> to_cchar_t(const char (&value)[N])
36
{
37
cchar_decay_string<N> result;
38
- for (int i = 0; i < N; ++i)
39
- result[i] = value[i];
+ for (size_t i = 0; i < N; ++i)
+ result[i] = static_cast<cchar_t>(value[i]);
40
return result;
41
}
42
43
consteval cchar_decay_string<1> to_cchar_t()
44
45
cchar_decay_string<1> result;
46
- result[0] = static_cast<cchar_t>(0);
+ result.operator[](0) = static_cast<cchar_t>(0);
47
+ // ^weird warning about ambiguous operator[] call here
48
49
50
0 commit comments