Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/P-p-H-d/mlib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Pelissier <Patrick.Pelissier@gmail.com>2023-12-02 15:21:45 +0300
committerPatrick Pelissier <Patrick.Pelissier@gmail.com>2023-12-02 15:21:45 +0300
commit2ee40339b051d95fe71eb5cf9608c9435f9f6e13 (patch)
tree615301a7ba858d36e8df18dd621c775514944987 /README.md
parent0c8eca893decfb3cc2019980404fc55507fff6c7 (diff)
Using emplace to generate init_with for shared_ptr:
Equivalent to C++ make_shared)
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index e5cb3c7..a5a3f8c 100644
--- a/README.md
+++ b/README.md
@@ -4434,6 +4434,18 @@ Initialize the shared pointer 'shared' to the same object than the one
pointed by 'src' (sharing ownership).
This function is thread safe from 'src' point of view.
+##### void name\_init\_with\[suffix\](shared\_t shared, args...)
+
+Initialize the shared pointer 'shared' to the new object initilized with args.
+The provided arguments shall therefore match one of the constructor provided
+by the EMPLACE\_TYPE operator.
+There is one generated method per suffix defined in the EMPLACE\_TYPE operator,
+and the 'suffix' in the generated method name corresponds to the suffix defined in
+in the EMPLACE\_TYPE operator (it can be empty).
+This method is created only if the EMPLACE\_TYPE operator is provided.
+See emplace chapter for more details.
+It is equivalent to the C++ make\_shared.
+
##### bool name\_NULL\_p(const shared\_t shared)
Return true if shared doesn't reference any object (i.e. is the NULL pointer).