increase uvalue internal sbo buffer to 3 pointers

This commit is contained in:
BlackMATov
2024-08-09 07:18:28 +07:00
parent f90e8af84b
commit ead26278fa
2 changed files with 3 additions and 3 deletions

View File

@@ -376,13 +376,13 @@ TEST_CASE("meta/meta_utilities/value") {
CHECK(ivec2::move_constructor_counter == 1);
CHECK(ivec2::copy_constructor_counter == 0);
val1.swap(val2);
val2.swap(val1);
CHECK(val1.as<ivec2>() == ivec2{1,2});
CHECK(val2.as<std::string>() == "world"s);
CHECK(ivec2::move_constructor_counter == 2);
CHECK(ivec2::copy_constructor_counter == 0);
swap(val1, val2);
swap(val2, val1);
CHECK(val1.as<std::string>() == "world"s);
CHECK(val2.as<ivec2>() == ivec2{1,2});
}

View File

@@ -119,7 +119,7 @@ namespace meta_hpp
struct alignas(std::max_align_t) internal_storage_t final {
// NOLINTNEXTLINE(*-avoid-c-arrays)
std::byte data[sizeof(void*) * 2];
std::byte data[sizeof(void*) * 3];
};
struct external_storage_t final {