In Effective C++ 3rd, Item 31, p146-p147, it says
That all happens behind the scenes inside the files containing the implementations of virtual constructors.
I'm not sure how to understand virtual constructors in this sentencen.
As far as I know, there is no virutal constructor in C++.
So, is this statement a mistake in Effective C++?
Or, does this virtual constructors refers to other things?
As far as I know, there is no virutal constructor in C++.
Correct.
So, is this statement a mistake in Effective C++?
No.
Or, does this virtual constructors refers to other things?
It's just a common name for a design pattern which results in code that works like a "virtual constructor" would work, if it existed. Instead of saying "a mechanism which works as if the constructor was virtual, even though it technically isn't", we simply say "virtual constructor".
Another common name for the same pattern is "factory method".