Title: Virtual constructor - C++ Patterns
Open Graph Title: Virtual constructor - C++ Patterns
Description: Create a copy of an object through a pointer to its base type.
Open Graph Description: Create a copy of an object through a pointer to its base type.
Opengraph URL: https://cpppatterns.com/patterns/virtual-constructor.html
Domain: cpppatterns.com
| twitter:card | summary |
| twitter:creator | @sftrabbit |
| og:site_name | C++ Patterns |
| fb:app_id | 676162015844286 |
Links:
| C++Patterns | https://cpppatterns.com/ |
| https://github.com/sftrabbit/CppPatterns-Patterns | |
| https://twitter.com/cpppatterns | |
| ← Patterns | https://cpppatterns.com/ |
| CC0 Public Domain Dedication | http://creativecommons.org/publicdomain/zero/1.0/ |
| c++11 | https://cpppatterns.com/#/search/c++11 |
| line 8 | https://cpppatterns.com/patterns/virtual-constructor.html#line8 |
| lines 14–17 | https://cpppatterns.com/patterns/virtual-constructor.html#line14 |
| line 20 | https://cpppatterns.com/patterns/virtual-constructor.html#line20 |
| line 22 | https://cpppatterns.com/patterns/virtual-constructor.html#line22 |
| wrapper functions | http://stackoverflow.com/a/6925201/150634 |
| https://github.com/sftrabbit | |
| Fork this pattern on GitHub | https://github.com/sftrabbit/CppPatterns-Patterns/tree/master/common-tasks/classes/virtual-constructor.cpp |
| Tweet | https://twitter.com/share |
| fork the project on GitHub | https://github.com/sftrabbit/CppPatterns-Patterns |
| Tweet | https://twitter.com/share |
| Joseph Mansfield | http://josephmansfield.uk/ |
Viewport: width=device-width,user-scalable=no