xo-flatstring: undercap flastring_concat instead of char arrays
This commit is contained in:
parent
6b43254b79
commit
0a03aa949b
3 changed files with 34 additions and 4 deletions
|
|
@ -136,12 +136,12 @@ main() {
|
|||
static_assert(sizeof(s14) == 7);
|
||||
|
||||
constexpr flatstring s15 = flatstring_concat(flatstring("hello"),
|
||||
", ",
|
||||
flatstring("world"));
|
||||
flatstring(", "),
|
||||
flatstring("world"));
|
||||
static_assert(s15.fixed_capacity == 13);
|
||||
static_assert(sizeof(s15) == 13);
|
||||
|
||||
constexpr auto s16 = xo::flatstring_concat("foo", "bar");
|
||||
constexpr auto s16 = xo::flatstring_concat(flatstring("foo"), flatstring("bar"));
|
||||
|
||||
static_assert(s16.fixed_capacity == 7);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue