Unit::Unit(Unit const &src) { *this = src; _index = ++Unit::index; print_created(); }
Unit::Unit(void) : _index(++Unit::index), _type("Unit"), _x(0), _y(0), _damage(0), _hp(0), _maxHp(0), _die(false) { print_created(); }
Unit::Unit(std::string const &type, int x, int y, int damage, int hp, int maxHp) : _index(++Unit::index), _type(type), _x(x), _y(y), _damage(damage), _hp(hp), _maxHp(maxHp), _die(false) { print_created(); }
MyObject3(int value) : value(value) { print_created(this, toString()); }
MyObject4(int value) : value{value} { print_created(this); }
Matrix(size_t rows, size_t cols) : m_rows(rows), m_cols(cols) { print_created(this, std::to_string(m_rows) + "x" + std::to_string(m_cols) + " matrix"); m_data = new float[rows*cols]; memset(m_data, 0, sizeof(float) * rows * cols); }
B() { print_created(this); }
TypeForHolderWithAddressOf() { print_created(this); }
TypeForMoveOnlyHolderWithAddressOf(int value) : value{value} { print_created(this); }
MyObject4b(int i) : MyObject4a(i) { print_created(this); }
MyObject4a(int i) { value = i; print_created(this); };
ReturnTester() { print_created(this); }
/* @brief: xxx */ static NoConstructor *new_instance() { auto *ptr = new NoConstructor(); print_created(ptr, "via new_instance"); return ptr; }
ExampleMandA(int value) : value(value) { print_created(this, value); }