diff --git a/include/yaml-cpp/node/impl.h b/include/yaml-cpp/node/impl.h index 3f200a0..ae49dd1 100644 --- a/include/yaml-cpp/node/impl.h +++ b/include/yaml-cpp/node/impl.h @@ -119,7 +119,8 @@ struct as_if { return fallback; try { - node.reset(node); + Node n; + n.reset(node); return node; } catch (conversion::DecodeException& e) { return fallback; @@ -129,14 +130,6 @@ struct as_if { } }; - - - - - - - - template struct as_if { explicit as_if(const Node& node_) : node(node_) {}