Skip to content

Instantly share code, notes, and snippets.

@bstaletic
bstaletic / drop_and_reuse.cpp
Last active June 8, 2020 21:21
Allocator messing around
#include <cstdio>
#include <memory_resource>
#include <new>
#include <type_traits>
#include <vector>
struct data {
data() = default;
data(int a) : a(a) {}
~data() { printf("destructed\n"); }
int a;