From fd6249f4d39eb4dd4f6bb625924cd69d191f875e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 13 May 2016 01:50:13 +0200 Subject: Clarify lazy_ptr usage in manual --- doc/manual.xhtml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/manual.xhtml b/doc/manual.xhtml index 11c1350..b16e1ce 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -7496,7 +7496,8 @@ public: // The eager pointer interface. // - // Initialization/assignment from an eager pointer. + // Initialization/assignment from an eager pointer to a + // transient object. // public: template <class Y> lazy_ptr (const eager_ptr<Y>&); @@ -7550,6 +7551,12 @@ public: }; +

Note that to initialize a lazy pointer to a persistent object from + its eager pointer one must use the constructor or reset() + function with the database as its first argument. The database is + required to support comparison of unloaded lazy pointers to persistent + objects.

+

In a lazy weak pointer interface, the load() function returns the strong (shared) eager pointer. The following transaction demonstrates the use of a lazy weak pointer based on -- cgit v1.1