How can I choose a different C++ constructor at runtime? Make somebody else do it, and then use copy elision. Click here to read the article