Compare commits

...

2 Commits

Author SHA1 Message Date
f8681441e2 Added example desctiption. 2026-02-27 21:43:04 -05:00
3f4d5b30a5 Added example aoutput. 2026-02-27 21:42:17 -05:00

View File

@@ -5,7 +5,7 @@
using namespace std;
int main() {
cout << "Hello World!" << endl;
cout << "Type factory simple example" << endl;
struct Base {
virtual ~Base() = default;
@@ -35,8 +35,8 @@ int main() {
auto a = factory.create ("one", 10);
auto b = factory.creator ("two") (10); // advanced API: get creator function
(void)a->get();
(void)b->get();
std::cout << a->get() << std::endl;
std::cout << b->get() << std::endl;
return 0;
}