From 376ef270b255256b4154eafaea3530ab01e7ccc5 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 29 Apr 2022 20:51:15 +0200 Subject: docs: add factory to basic example --- examples/basic/src/bootstrap.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'examples/basic/src/bootstrap.cpp') diff --git a/examples/basic/src/bootstrap.cpp b/examples/basic/src/bootstrap.cpp index fe59c5d..38edcc3 100644 --- a/examples/basic/src/bootstrap.cpp +++ b/examples/basic/src/bootstrap.cpp @@ -16,7 +16,13 @@ yacppdic::Container bootstrap() container.bind().to(); container.bind().to(); - container.bind().to(); + + container.bind().to_factory( + []() + { + return std::make_unique(); + } + ); return container; } -- cgit v1.2.3-18-g5258