From: Christopher L. Conway Date: Thu, 15 Apr 2010 17:26:29 +0000 (+0000) Subject: Implementing missing NodeBuilder::constructNode X-Git-Tag: cvc5-1.0.0~9112 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5578603c5390b643a4dc6dd4a2ee0679ac5f7e7;p=cvc5.git Implementing missing NodeBuilder::constructNode --- diff --git a/src/expr/node_builder.h b/src/expr/node_builder.h index a093fc954..09e72660e 100644 --- a/src/expr/node_builder.h +++ b/src/expr/node_builder.h @@ -1245,6 +1245,16 @@ void NodeBuilderBase::decrRefCounts() { d_inlineNv.d_nchildren = 0; } +template +Node NodeBuilderBase::constructNode() { + return Node(constructNV()); +} + +template +Node NodeBuilderBase::constructNode() const { + return Node(constructNV()); +} + template Node* NodeBuilderBase::constructNodePtr() { return new Node(constructNV()); @@ -1255,6 +1265,16 @@ Node* NodeBuilderBase::constructNodePtr() const { return new Node(constructNV()); } +template +NodeBuilderBase::operator Node() { + return constructNode(); +} + +template +NodeBuilderBase::operator Node() const { + return constructNode(); +} + template expr::NodeValue* NodeBuilderBase::constructNV() { Assert(!isUsed(), "NodeBuilder is one-shot only; " @@ -1603,16 +1623,6 @@ expr::NodeValue* NodeBuilderBase::constructNV() const { } } -template -NodeBuilderBase::operator Node() { - return Node(constructNV()); -} - -template -NodeBuilderBase::operator Node() const { - return Node(constructNV()); -} - template template void NodeBuilder::internalCopy(const NodeBuilder& nb) {