First, a solution: use a static member function or a function without a member.
As for the behavior, Derived::generateName() will be called. A long sentence in the C ++ standard that defines this behavior says (C ++ 03 12.7 / 3):
When a virtual function is called directly or indirectly from a constructor (including from a mem initializer for a data element) or from a destructor, and the object to which the call is applied is an object that is under development or destruction, the called function is the one a constructor or destructor or one of its bases is defined, but not a function that overrides it in a class derived from the constructor or destructor class, or overrides it in one of the other base classes of the derived object itself.
Since the constructor executed during the virtual call is the Derived constructor, Derived::generateName() called.
Now the deleted answer rightly refers to an article by Scott Meyers, which recommends "Never call virtual functions during construction or destruction." The rules for what is called call forwarding are complex and hard to remember.
James McNellis
source share