diff --git a/src/lib/allocation-cluster.hpp b/src/lib/allocation-cluster.hpp index ae76f1336..4ecb4ec98 100644 --- a/src/lib/allocation-cluster.hpp +++ b/src/lib/allocation-cluster.hpp @@ -121,6 +121,9 @@ namespace lib { template Allocator(Allocator const& o) : mother_{o.mother_} { } + template + bool operator== (Allocator const& o) const { return mother_ == o.mother_; } + AllocationCluster* mother_; }; diff --git a/src/lib/several-builder.hpp b/src/lib/several-builder.hpp index ce5d69946..3ee046fd0 100644 --- a/src/lib/several-builder.hpp +++ b/src/lib/several-builder.hpp @@ -62,17 +62,8 @@ namespace lib { namespace {// Allocation management policies - struct HeapOwn - { - void* - realloc (void* data, size_t oldSiz, size_t newSiz) - { - UNIMPLEMENTED ("adjust memory allocation"); ///////////////////////////OOO Problem Objekte verschieben - } - }; - - + template class ALO> class ElementFactory : private ALO @@ -152,6 +143,24 @@ namespace lib { }; + template class ALO> + struct AllocationPolicy + : ElementFactory + { + using Fac = ElementFactory; + using Fac::Fac; + + void* + realloc (void* data, size_t oldSiz, size_t newSiz) + { + UNIMPLEMENTED ("adjust memory allocation"); ///////////////////////////OOO Problem Objekte verschieben + } + }; + + template + using HeapOwn = AllocationPolicy; + + using std::is_trivially_move_constructible_v; using std::is_trivially_destructible_v; using std::has_virtual_destructor_v; @@ -202,7 +211,7 @@ namespace lib { */ template ,class E =I ///< a subclass element element type (relevant when not trivially movable and destructible) - ,class POL =HeapOwn ///< Allocator policy + ,class POL =HeapOwn ///< Allocator policy > class SeveralBuilder : Several diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 00d8c45cb..93061696c 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -81782,19 +81782,31 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + - - + + + + + + + + + + - + + + + + @@ -82191,6 +82203,16 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + @@ -82198,7 +82220,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + + @@ -82272,6 +82295,48 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +