diff --git a/include/sonic/dom/dynamicnode.h b/include/sonic/dom/dynamicnode.h index e95a5ff0..ca19b0dd 100644 --- a/include/sonic/dom/dynamicnode.h +++ b/include/sonic/dom/dynamicnode.h @@ -34,10 +34,10 @@ namespace sonic_json { template -class DNode : public GenericNode { +class DNode : public GenericNode> { public: using NodeType = DNode; - using BaseNode = GenericNode; + using BaseNode = GenericNode; using AllocatorType = Allocator; using MemberNode = typename NodeTraits::MemberNode; using MemberIterator = typename NodeTraits::MemberIterator; diff --git a/include/sonic/dom/genericnode.h b/include/sonic/dom/genericnode.h index a895382d..0c8e6c36 100644 --- a/include/sonic/dom/genericnode.h +++ b/include/sonic/dom/genericnode.h @@ -48,19 +48,34 @@ class MemberNodeT { template struct NodeTraits; +template +static inline void Update(T&, const S&, Allocator&); + +// Copied from http://coliru.stacked-crooked.com/a/8dd19d21817cadf5 +template