Skip to content

Instantly share code, notes, and snippets.

@deanturpin
Created June 28, 2019 10:41
Show Gist options
  • Save deanturpin/8e82cc22f7da3542aae03f9ab26ebda8 to your computer and use it in GitHub Desktop.
Save deanturpin/8e82cc22f7da3542aae03f9ab26ebda8 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
struct fax {
~fax() {
static size_t i = 0;
std::cout << ++i << " dtor\n";
}
};
int main() {
std::vector<fax> y;
for (size_t i = 0; i < 5; ++i)
y.push_back(fax());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment