diff --git a/src/lib/diff/gen-node.hpp b/src/lib/diff/gen-node.hpp index b883861ce..566469d5c 100644 --- a/src/lib/diff/gen-node.hpp +++ b/src/lib/diff/gen-node.hpp @@ -457,6 +457,31 @@ namespace diff{ + /** + * metafunction to detect types able to be wrapped into a GenNode. + * Only a limited and fixed set of types may be placed within a GenNode, + * as defined through the typelist `lib::diff::DataValues`. This metafunction + * allows to enable or disable specialisations and definitions based on the + * fact if a type in question can live within a GenNode. + */ + template + struct can_wrap_in_GenNode + { + using Yes = lib::meta::Yes_t; + using No = lib::meta::No_t; + + template + static Yes check(typename variant::CanBuildFrom::Type*); + template + static No check(...); + + public: + static const bool value = (sizeof(Yes)==sizeof(check(0))); + }; + + + + /* === iteration / recursive expansion === */ diff --git a/src/lib/diff/tree-mutator-collection-binding.hpp b/src/lib/diff/tree-mutator-collection-binding.hpp index 3ed8e1d9b..b9cc8ca40 100644 --- a/src/lib/diff/tree-mutator-collection-binding.hpp +++ b/src/lib/diff/tree-mutator-collection-binding.hpp @@ -383,21 +383,8 @@ }; - using lib::meta::Yes_t; - using lib::meta::No_t; using lib::meta::enable_if; - - template - struct can_wrap_in_GenNode - { - template - static Yes_t check(typename lib::variant::CanBuildFrom::Type*); - template - static No_t check(...); - - public: - static const bool value = (sizeof(Yes_t)==sizeof(check(0))); - }; + using lib::diff::can_wrap_in_GenNode; template diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index b6a2c6dfc..a7f2e2b2b 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -611,8 +611,7 @@ Mutator verwendet einen Binder

- - + @@ -2347,8 +2346,7 @@ daß sich alle relevanten Eigenschaften darstellen lassen

- - +
@@ -2363,8 +2361,7 @@ dann wird es wohl so sein, daß sie auch nicht gebraucht wird

- -
+ @@ -2392,8 +2389,7 @@ sofern es gelingt, die funktionalität gutmütig zu degradieren.

- - +
@@ -2412,11 +2408,11 @@ - + - + @@ -2435,11 +2431,28 @@ eine womöglich irreführende Meldung generiert

- -
+ + +
+
+ + + + + + + + + + + + + + + + - @@ -2451,6 +2464,60 @@ + + + + + + + + + + +

+ ...denn es ist sehr verwirrend, welche Signatur denn nun die Lambdas haben müssen +

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

+ ...denn es kann keinen Default-Matcher geben.... +

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