From: Daniel Arndt Date: Thu, 9 May 2019 12:49:31 +0000 (-0400) Subject: Match explicitly defined copy constructors with copy assignment operators X-Git-Tag: v9.1.0-rc1~100^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f59e2189afb642a6439e5ad08b46dae685679e43;p=dealii.git Match explicitly defined copy constructors with copy assignment operators --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index 931e7f30d7..f06cd09b5c 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -1532,6 +1532,18 @@ namespace Threads */ Task() = default; + + /** + * Copy assignment operator. + */ + const Task & + operator=(const Task &t) + { + task_descriptor = t.task_descriptor; + return *this; + } + + /** * Join the task represented by this object, i.e. wait for it to finish. * diff --git a/include/deal.II/lac/sparse_matrix.h b/include/deal.II/lac/sparse_matrix.h index ec2731eee3..853700501b 100644 --- a/include/deal.II/lac/sparse_matrix.h +++ b/include/deal.II/lac/sparse_matrix.h @@ -378,6 +378,12 @@ namespace SparseMatrixIterators */ Iterator(const SparseMatrixIterators::Iterator &i); + /** + * Copy assignment operator. + */ + const Iterator & + operator=(const SparseMatrixIterators::Iterator &i); + /** * Prefix increment. */ @@ -2262,6 +2268,17 @@ namespace SparseMatrixIterators + template + inline const Iterator & + Iterator:: + operator=(const SparseMatrixIterators::Iterator &i) + { + accessor = *i; + return *this; + } + + + template inline Iterator & Iterator::operator++() diff --git a/include/deal.II/particles/particle_iterator.h b/include/deal.II/particles/particle_iterator.h index 5e687fb7a9..b2b340acc5 100644 --- a/include/deal.II/particles/particle_iterator.h +++ b/include/deal.II/particles/particle_iterator.h @@ -66,7 +66,7 @@ namespace Particles * Assignment operator. */ ParticleIterator & - operator=(const ParticleIterator &); + operator=(const ParticleIterator &) = default; /** * Dereferencing operator, returns a pointer of the particle pointed to. diff --git a/source/particles/particle_iterator.cc b/source/particles/particle_iterator.cc index 9b5345ee6d..2a9956817d 100644 --- a/source/particles/particle_iterator.cc +++ b/source/particles/particle_iterator.cc @@ -62,15 +62,6 @@ namespace Particles } - template - ParticleIterator & - ParticleIterator::operator=(const ParticleIterator &other) - { - accessor = other.accessor; - return *this; - } - - template bool