{"push_id":1246432780,"size":2,"distinct_size":2,"ref":"refs/heads/example-constructor-tracking","head":"e0bb17d4dd2615f770a8ea2e767dc05fd3c3dd0e","before":"6a1b28146d1d3189d5d4f98347e9dd02e08d4729","commits":[{"sha":"480b38d5d96de40420020d6a9e3f1aac7e6f9fc2","author":{"name":"Jason Rhinelander","email":"158e602a35675d2a0b685478824aa5995557a235@imaginary.ca"},"message":"Improve constructor/destructor tracking\n\nThis commit rewrites the examples that look for constructor/destructor\ncalls to do so via static variable tracking rather than output parsing.\n\nThe added ConstructorStats class provides methods to keep track of\nconstructors and destructors, number of default/copy/move constructors,\nand number of copy/move assignments.  It also provides a mechanism for\nstoring values (e.g. for value construction), and then allows all of\nthis to be checked at the end of a test by getting the statistics for a\nC++ (or python mapping) class.\n\nBy not relying on the precise pattern of constructions/destructions,\nbut rather simply ensuring that every construction is matched with a\ndestruction on the same object, we ensure that everything that gets\ncreated also gets destroyed as expected.\n\nThis replaces all of the various \"std::cout << whatever\" code in\nconstructors/destructors with\n`print_created(this)`/`print_destroyed(this)`/etc. functions which\nprovide similar output, but now has a unified format across the\ndifferent examples, including a new ### prefix that makes mixed example\noutput and lifecycle events easier to distinguish.\n\nWith this change, relaxed mode is no longer needed, which enables\ntesting for proper destruction under MSVC, and under any other compiler\nthat generates code calling extra constructors, or optimizes away any\nconstructors.  GCC/clang are used as the baseline for move\nconstructors; the tests are adapted to allow more move constructors to\nbe evoked (but other types are constructors much have matching counts).","distinct":true,"url":"https://api.github.com/repos/jagerman/pybind11/commits/480b38d5d96de40420020d6a9e3f1aac7e6f9fc2"},{"sha":"e0bb17d4dd2615f770a8ea2e767dc05fd3c3dd0e","author":{"name":"Jason Rhinelander","email":"158e602a35675d2a0b685478824aa5995557a235@imaginary.ca"},"message":"Disable run_test output buffering\n\nrun_test currently runs the test subprocess with buffering enabled,\nwhich can (depending on OS and python version, and probably other\nthings) result in output from C++ code being inserted in the middle of\npython output (or vice versa).  This, of course, breaks test output.\nThis commit runs the subprocess with -u to disable python output\nbuffering of the individual test.","distinct":true,"url":"https://api.github.com/repos/jagerman/pybind11/commits/e0bb17d4dd2615f770a8ea2e767dc05fd3c3dd0e"}]}
{"actor":{"display_login":"jagerman"}}