mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-14 19:41:29 +07:00
increase uvalue internal sbo buffer to 3 pointers
This commit is contained in:
@@ -376,13 +376,13 @@ TEST_CASE("meta/meta_utilities/value") {
|
|||||||
CHECK(ivec2::move_constructor_counter == 1);
|
CHECK(ivec2::move_constructor_counter == 1);
|
||||||
CHECK(ivec2::copy_constructor_counter == 0);
|
CHECK(ivec2::copy_constructor_counter == 0);
|
||||||
|
|
||||||
val1.swap(val2);
|
val2.swap(val1);
|
||||||
CHECK(val1.as<ivec2>() == ivec2{1,2});
|
CHECK(val1.as<ivec2>() == ivec2{1,2});
|
||||||
CHECK(val2.as<std::string>() == "world"s);
|
CHECK(val2.as<std::string>() == "world"s);
|
||||||
CHECK(ivec2::move_constructor_counter == 2);
|
CHECK(ivec2::move_constructor_counter == 2);
|
||||||
CHECK(ivec2::copy_constructor_counter == 0);
|
CHECK(ivec2::copy_constructor_counter == 0);
|
||||||
|
|
||||||
swap(val1, val2);
|
swap(val2, val1);
|
||||||
CHECK(val1.as<std::string>() == "world"s);
|
CHECK(val1.as<std::string>() == "world"s);
|
||||||
CHECK(val2.as<ivec2>() == ivec2{1,2});
|
CHECK(val2.as<ivec2>() == ivec2{1,2});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ namespace meta_hpp
|
|||||||
|
|
||||||
struct alignas(std::max_align_t) internal_storage_t final {
|
struct alignas(std::max_align_t) internal_storage_t final {
|
||||||
// NOLINTNEXTLINE(*-avoid-c-arrays)
|
// NOLINTNEXTLINE(*-avoid-c-arrays)
|
||||||
std::byte data[sizeof(void*) * 2];
|
std::byte data[sizeof(void*) * 3];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct external_storage_t final {
|
struct external_storage_t final {
|
||||||
|
|||||||
Reference in New Issue
Block a user