We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad44f4a commit 59b37f3Copy full SHA for 59b37f3
src/variant_allocator.h
@@ -60,6 +60,7 @@ class VariantAllocator {
60
// Trigger compile-time error if T is larger than 16 bytes
61
static_assert(sizeof(T) <= sizeof(BucketLarge), "Variant doesn't fit inside the VariantAllocator");
62
63
+ variant->~T();
64
if constexpr (sizeof(T) <= sizeof(BucketSmall)) {
65
bucket_small.free(reinterpret_cast<BucketSmall*>(variant));
66
} else {
0 commit comments