From 7a70e75656d31428c9bbbd51fbf1ca920e577ed1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 28 Feb 2023 01:24:18 +0000 Subject: Remove to specify if the Selection pointer type is shared or not Inferred based on whether the pointer is copyable or not. --- lib/persistence.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/persistence.h b/lib/persistence.h index bfd27f0..458ba4d 100644 --- a/lib/persistence.h +++ b/lib/persistence.h @@ -381,7 +381,8 @@ namespace Persistence { using SeenSharedObjects = std::map; inline SeenSharedObjects seenSharedObjects; - template struct SelectionPtrBase : public SelectionV { + template struct SelectionPtrBase : public SelectionV { + static constexpr auto shared = std::is_copy_assignable_v; using T = typename Ptr::element_type; struct SelectionObj : public SelectionV { struct MakeObjectByTypeName : public SelectionV { @@ -526,13 +527,13 @@ namespace Persistence { } }; - template struct SelectionT> : public SelectionPtrBase, false> { - using SelectionPtrBase, false>::SelectionPtrBase; + template struct SelectionT> : public SelectionPtrBase> { + using SelectionPtrBase>::SelectionPtrBase; }; - template struct SelectionT> : public SelectionPtrBase, true> { - using SelectionPtrBase, true>::SelectionPtrBase; - using SelectionPtrBase, true>::setValue; + template struct SelectionT> : public SelectionPtrBase> { + using SelectionPtrBase>::SelectionPtrBase; + using SelectionPtrBase>::setValue; void setValue(std::string && id) override -- cgit v1.2.3