Skip to content

Commit 90d0f03

Browse files
authored
Merge pull request ceph#60997 from MaxKellermann/sstring__char8_t
tools/ceph-dencoder/sstring.h: use `char8_t` instead of `unsigned char` Reviewed-by: Casey Bodley <[email protected]>
2 parents 58c3b3c + 69c6e9e commit 90d0f03

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/common/sstring.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ template <typename char_type, typename Size, Size max_size>
4444
class basic_sstring {
4545
static_assert(
4646
(std::is_same<char_type, char>::value
47+
|| std::is_same<char_type, char8_t>::value
4748
|| std::is_same<char_type, signed char>::value
4849
|| std::is_same<char_type, unsigned char>::value),
4950
"basic_sstring only supports single byte char types");

src/tools/ceph-dencoder/sstring.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class sstring_wrapper {
88
using sstring16 = basic_sstring<char, uint32_t, 16>;
99
sstring16 s1;
10-
using sstring24 = basic_sstring<unsigned char, uint16_t, 24>;
10+
using sstring24 = basic_sstring<char8_t, uint16_t, 24>;
1111
sstring24 s2;
1212
public:
1313
sstring_wrapper() = default;

0 commit comments

Comments
 (0)