No you can’t, constructors can’t be virtual.
C++03 – 12.1 Constructors
4) A constructor shall not be
virtual(10.3) orstatic(9.4). […]
If you need something like this, you can look up the virtual constructor idiom here.
No you can’t, constructors can’t be virtual.
C++03 – 12.1 Constructors
4) A constructor shall not be
virtual(10.3) orstatic(9.4). […]
If you need something like this, you can look up the virtual constructor idiom here.