File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -164,5 +164,13 @@ ErrorOr<char8_t> CharacterConverter::pop_utf8() {
164
164
return static_cast <char8_t >(output);
165
165
}
166
166
167
+ template <> ErrorOr<char8_t > CharacterConverter::pop () { return pop_utf8 (); }
168
+ template <> ErrorOr<char32_t > CharacterConverter::pop () { return pop_utf32 (); }
169
+
170
+ template <> size_t CharacterConverter::sizeAs<char8_t >() {
171
+ return state->total_bytes ;
172
+ }
173
+ template <> size_t CharacterConverter::sizeAs<char32_t >() { return 1 ; }
174
+
167
175
} // namespace internal
168
176
} // namespace LIBC_NAMESPACE_DECL
Original file line number Diff line number Diff line change @@ -33,17 +33,13 @@ class CharacterConverter {
33
33
bool isValidState ();
34
34
35
35
template <typename CharType> size_t sizeAs ();
36
- template <> size_t sizeAs<char8_t >() { return state->total_bytes ; }
37
- template <> size_t sizeAs<char32_t >() { return 1 ; }
38
36
39
37
int push (char8_t utf8_byte);
40
38
int push (char32_t utf32);
41
39
42
40
ErrorOr<char8_t > pop_utf8 ();
43
41
ErrorOr<char32_t > pop_utf32 ();
44
42
template <typename CharType> ErrorOr<CharType> pop ();
45
- template <> ErrorOr<char8_t > pop () { return pop_utf8 (); }
46
- template <> ErrorOr<char32_t > pop () { return pop_utf32 (); }
47
43
};
48
44
49
45
} // namespace internal
You can’t perform that action at this time.
0 commit comments