Do you have -std=c++11
specified?
When I compile on the desktop with:
clang++ -std=c++03 -stdlib=libc++ test.cpp
I get what you get:
Start
Allocating 0 param TestClass
0 param constructor - Default, 0
Done allocating, going out of scope
Destructor - Default, 0
Allocating 2 param TestClass
2 param constructor - 2 param, 2
Destructor - 2 param, 2
Destructor - 2 param, 2
Done allocating, going out of scope
Destructor - 2 param, 2
Done
But when I turn on -std=c++11
I get:
Start
Allocating 0 param TestClass
0 param constructor - Default, 0
Done allocating, going out of scope
Destructor - Default, 0
Allocating 2 param TestClass
2 param constructor - 2 param, 2
Done allocating, going out of scope
Destructor - 2 param, 2
Done