Created
June 28, 2019 10:41
-
-
Save deanturpin/8e82cc22f7da3542aae03f9ab26ebda8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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