Oh yeah… oooh yeah.
C++11 supports constructor delegation.
class Foo { public: Foo(char x, int y) : _x(x), _y(y) {} Foo(int y) : Foo('a', y) {} // This was forbidden in C++03 private: char _x; int _y; };
Oh yeah… oooh yeah.
C++11 supports constructor delegation.
class Foo { public: Foo(char x, int y) : _x(x), _y(y) {} Foo(int y) : Foo('a', y) {} // This was forbidden in C++03 private: char _x; int _y; };