From 854f4eca58c84e10e8e1a3db45f9e9a09cd6b728 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 15 Dec 2019 04:12:07 +0100 Subject: [PATCH] Diff-Listener: investigate weird template errors with the new decorator layer, we suddenly trigger a chain of template instantiation errors. At first sight, they are almost undecipherable, yet after some experimentation, it becomes clear that they relate down to the base class (TreeMutator), which is defined MoveOnly This seems to indicate that, at some point in the call chain, we are digressing from the move-construction scheme and switch over to copy construction, which in the end failst (and shall fail). Inconclusive, to be investigated further --- .../diff/tree-mutator-collection-binding.hpp | 2 +- .../diff/tree-mutator-listener-binding.hpp | 6 +- src/lib/diff/tree-mutator.hpp | 4 +- wiki/thinkPad.ichthyo.mm | 183 ++++++++++++++++++ 4 files changed, 191 insertions(+), 4 deletions(-) diff --git a/src/lib/diff/tree-mutator-collection-binding.hpp b/src/lib/diff/tree-mutator-collection-binding.hpp index 4903c1387..777512c57 100644 --- a/src/lib/diff/tree-mutator-collection-binding.hpp +++ b/src/lib/diff/tree-mutator-collection-binding.hpp @@ -164,7 +164,7 @@ namespace diff{ */ template struct CollectionBinding - : util::MoveOnly +// : util::MoveOnly { using Coll = typename Strip::TypeReferred; using Elm = typename Coll::value_type; diff --git a/src/lib/diff/tree-mutator-listener-binding.hpp b/src/lib/diff/tree-mutator-listener-binding.hpp index f345d6d0a..d2345e62a 100644 --- a/src/lib/diff/tree-mutator-listener-binding.hpp +++ b/src/lib/diff/tree-mutator-listener-binding.hpp @@ -105,12 +105,16 @@ namespace diff{ */ template template +// inline Builder> inline auto Builder::onStructuralChange (LIS changeListener) { ASSERT_VALID_SIGNATURE (LIS, void(void)) - return chainedBuilder> (changeListener); + using BIN = Detector4StructuralChanges; + BIN furz{changeListener, move(*this)}; + return Builder (move (furz)); +// return chainedBuilder> (changeListener); } }//(END)Mutator-Builder decorator components... diff --git a/src/lib/diff/tree-mutator.hpp b/src/lib/diff/tree-mutator.hpp index 7d50a5cd0..f7e625984 100644 --- a/src/lib/diff/tree-mutator.hpp +++ b/src/lib/diff/tree-mutator.hpp @@ -141,7 +141,7 @@ namespace diff{ * activities to concrete manipulations known within target scope. */ class TreeMutator - : util::MoveOnly +// : util::MoveOnly { public: @@ -149,7 +149,7 @@ namespace diff{ // only default and move construction allowed TreeMutator () =default; - TreeMutator (TreeMutator&&) =default; +// TreeMutator (TreeMutator&&) =default; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 2d2ee986f..b197e722d 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -36078,6 +36078,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ ...indem man nur teilweise PICK-Verben sendet, und dann einfach weggeht. +

+

+ Dann wir der Rest mit dem Mutator zusammen weggeworfen. +

+ + +
+
+ + + + + + +

+ um das zu unterbinden, müßten alle Binding-Layer kollaborieren +

+ + +
+ + + + + +

+ ..weil man diesen Umstand nicht generisch erkennen kann. +

+

+ Nach gegenwärtigem Stand kann das nur im Collection-Binding auftreten; +

+

+ dieses aber hätte auch die notwendigen Informationen, um diese Situation zu erkennen +

+ + +
+
+ + + + + + + + + + + +

+ d.h. es prüft, ob keine Elemente im Arbeitspuffer übrig sind +

+ + +
+
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ denn einfacher wird der Code dadurch nicht, nur kürzer. +

+

+ Und mühsam für den Leser ist er so oder so... dann also lieber alles ausschreiben +

+ + +
+
+
+ + + + + + + +

+ da muß man auch erst mal drauf kommen, was einem der Compiler da so sagen will. +

+

+ use of deleted function <some copy-ctor> +

+

+ note: function <some-copy-ctor> is deleted, because the default definition would be ill formed +

+

+ error: ...und hier kommt nun die default-definition... +

+

+ und damit wiederholt sich das Ketten-Argument bis zur Basisklasse runter!!! +

+ + +
+ +
+ + + + + + + + + + + + + + + + + +