mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
Use = delete
to delete special methods.
This provides a better experience than just marking them as private and leaving them as undefined symbols.
This commit is contained in:
parent
059b795faa
commit
82d853e5f8
9 changed files with 24 additions and 30 deletions
|
@ -37,8 +37,6 @@ private:
|
|||
|
||||
char * raw_ptr() const { return reinterpret_cast<char*>(reinterpret_cast<size_t*>(m_data) - 1); }
|
||||
|
||||
array & operator=(array const & source);
|
||||
|
||||
void set_data(void * mem, unsigned sz) {
|
||||
size_t * _mem = static_cast<size_t*>(mem);
|
||||
*_mem = sz;
|
||||
|
@ -115,6 +113,8 @@ public:
|
|||
destroy_elements();
|
||||
}
|
||||
|
||||
array & operator=(array const & source) = delete;
|
||||
|
||||
// Free the memory used to store the array.
|
||||
template<typename Allocator>
|
||||
void finalize(Allocator & a) {
|
||||
|
|
|
@ -35,13 +35,14 @@ class params_ref {
|
|||
params * m_params;
|
||||
void init();
|
||||
void copy_core(params const * p);
|
||||
params_ref& operator=(params_ref const& p) = delete;
|
||||
void set(params_ref const& p);
|
||||
public:
|
||||
params_ref():m_params(nullptr) {}
|
||||
params_ref(params_ref const & p);
|
||||
~params_ref();
|
||||
|
||||
params_ref& operator=(params_ref const& p) = delete;
|
||||
|
||||
static params_ref const & get_empty() { return g_empty_params_ref; }
|
||||
|
||||
|
||||
|
|
|
@ -24,13 +24,14 @@ template<typename Manager, unsigned INITIAL_SIZE = 16>
|
|||
class _scoped_numeral_buffer : public sbuffer<typename Manager::numeral, INITIAL_SIZE> {
|
||||
typedef sbuffer<typename Manager::numeral, INITIAL_SIZE> super;
|
||||
Manager & m_manager;
|
||||
_scoped_numeral_buffer(_scoped_numeral_buffer const & v);
|
||||
public:
|
||||
_scoped_numeral_buffer(Manager & m):m_manager(m) {}
|
||||
~_scoped_numeral_buffer() {
|
||||
reset();
|
||||
}
|
||||
|
||||
_scoped_numeral_buffer(_scoped_numeral_buffer const & v) = delete;
|
||||
|
||||
void reset() {
|
||||
unsigned sz = this->size();
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue