3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 12:28:44 +00:00

Add goodies

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-01-09 18:43:32 -08:00
parent 81807c7001
commit 1712f0a33b
2 changed files with 11 additions and 2 deletions

View file

@ -231,8 +231,13 @@ public:
SASSERT(size() == nsz);
}
private:
buffer& operator=(buffer const&);
buffer & operator=(buffer const & other) {
if (this == &other)
return *this;
reset();
append(other);
return *this;
}
};
template<typename T, unsigned INITIAL_SIZE=16>

View file

@ -243,6 +243,10 @@ public:
m_ptr = 0;
return tmp;
}
void swap(scoped_ptr & p) {
std::swap(m_ptr, p.m_ptr);
}
};
template<typename T1, typename T2>