diff --git a/src/lib/diff/tree-mutator-collection-binding.hpp b/src/lib/diff/tree-mutator-collection-binding.hpp index 03f7c5c79..741f8f3e5 100644 --- a/src/lib/diff/tree-mutator-collection-binding.hpp +++ b/src/lib/diff/tree-mutator-collection-binding.hpp @@ -383,6 +383,55 @@ }; + 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))); + }; + + + template + struct _DefaultPayload + { + static bool + match (GenNode const& spec, ELM const& elm) + { + UNIMPLEMENTED("lalü"); + } + + static ELM + construct (GenNode const& spec) + { + UNIMPLEMENTED("lalü"); + } + }; + + template + struct _DefaultPayload>> + { + static bool + match (GenNode const& spec, ELM const& elm) + { + return spec.matches(elm); + } + + static ELM + construct (GenNode const& spec) + { + return spec.data.get(); + } + }; + /** * starting point for configuration of a binding to STL container. * When using the "nested DSL" to setup a binding to child elements @@ -400,17 +449,7 @@ using Coll = typename Strip::TypeReferred; using Elm = typename Coll::value_type; - static bool - default_contentMatch (GenNode const& spec, Elm const& elm) - { - return spec.matches(elm); - } - - static Elm - default_construct_from_payload (GenNode const& spec) - { - return spec.data.get(); - } + using Payload = _DefaultPayload; static bool disable_selector (GenNode const&) @@ -433,8 +472,8 @@ using FallbackBindingConfiguration = CollectionBindingBuilder