summaryrefslogtreecommitdiff
path: root/src/theory/sets/theory_sets.cpp
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2018-08-22 13:09:39 -0700
committerGitHub <noreply@github.com>2018-08-22 13:09:39 -0700
commit923bd039728c972fef1bbf1a24f23f735e295bce (patch)
tree9b4c892e2ab9c38a8704a486e3060020b590dcbb /src/theory/sets/theory_sets.cpp
parent3e098509138842fbfb8cfc504b6ad390f7630948 (diff)
Wrapping TheorySetsPrivate in a unique_ptr. (#2356)
Diffstat (limited to 'src/theory/sets/theory_sets.cpp')
-rw-r--r--src/theory/sets/theory_sets.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/theory/sets/theory_sets.cpp b/src/theory/sets/theory_sets.cpp
index 162ebb757..188523a10 100644
--- a/src/theory/sets/theory_sets.cpp
+++ b/src/theory/sets/theory_sets.cpp
@@ -28,10 +28,16 @@ TheorySets::TheorySets(context::Context* c,
const LogicInfo& logicInfo)
: Theory(THEORY_SETS, c, u, out, valuation, logicInfo),
d_internal(new TheorySetsPrivate(*this, c, u))
-{}
+{
+ // Do not move me to the header.
+ // The constructor + destructor are not in the header as d_internal is a
+ // unique_ptr<TheorySetsPrivate> and TheorySetsPrivate is an opaque type in
+ // the header (Pimpl). See https://herbsutter.com/gotw/_100/ .
+}
-TheorySets::~TheorySets() {
- delete d_internal;
+TheorySets::~TheorySets()
+{
+ // Do not move me to the header. See explanation in the constructor.
}
void TheorySets::addSharedTerm(TNode n) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback