modernize-redundant-void-arg,
modernize-use-emplace,
modernize-use-equals-default,
+ modernize-use-equals-delete,
modernize-use-nullptr,
modernize-use-using,
mpi-*,
operator>(const DerivedIterator &) const;
protected:
- /**
+ /*
* The inheriting class should have a default constructor.
*/
- LinearIndexIterator() = default;
+ LinearIndexIterator() = default; // NOLINT
/**
* Constructor that copies an accessor.
*/
class ParameterHandler : public Subscriptor
{
-private:
- /**
- * Inhibit automatic CopyConstructor.
- */
- ParameterHandler(const ParameterHandler &) = delete;
-
- /**
- * Inhibit automatic assignment operator.
- */
- ParameterHandler &
- operator=(const ParameterHandler &) = delete;
-
public:
/**
* List of possible output formats used for
*/
virtual ~ParameterHandler() override = default;
+ /**
+ * Inhibit automatic CopyConstructor.
+ */
+ ParameterHandler(const ParameterHandler &) = delete;
+
+ /**
+ * Inhibit automatic assignment operator.
+ */
+ ParameterHandler &
+ operator=(const ParameterHandler &) = delete;
+
/**
* Parse each line from a stream until the stream returns the <tt>eof</tt>
* condition or error to provide values for known parameter fields. The second
*/
Accessor(tensor_type &tensor, const TableIndices<rank> &previous_indices);
- /**
- * Default constructor. Not needed, so deleted.
- */
- Accessor() = delete;
-
/**
* Copy constructor.
*/
*/
Accessor(const TableType &table, const iterator data);
- /**
- * Default constructor. Not needed, and invisible, so deleted.
- */
- Accessor() = delete;
-
public:
/**
* Copy constructor. This constructor is public so that one can pass
*/
Accessor(const TableType &table, const iterator data);
- /**
- * Default constructor. Not needed, so deleted.
- */
- Accessor() = delete;
-
public:
/**
* Copy constructor. This constructor is public so that one can pass
*/
Accessor(const Accessor &a);
-
/**
* Index operator. Performs a range check.
*/
*/
class InternalDataBase
{
- private:
- /**
- * Copy construction is forbidden.
- */
- InternalDataBase(const InternalDataBase &) = delete;
-
public:
/**
* Constructor. Sets update_flags to @p update_default and @p first_cell
*/
virtual ~InternalDataBase() = default;
+ /**
+ * Copy construction is forbidden.
+ */
+ InternalDataBase(const InternalDataBase &) = delete;
+
/**
* A set of update flags specifying the kind of information that an
* implementation of the FiniteElement interface needs to compute on each
const FiniteElement<dim, spacedim> &fe);
/**
- * The copy operator is deleted since objects of this class are not copyable.
+ * The copy assignment is deleted since objects of this class are not
+ * copyable.
*/
FEValuesBase &
operator=(const FEValuesBase &) = delete;
+ /**
+ * The copy constructor is deleted since objects of this class are not
+ * copyable.
+ */
+ FEValuesBase(const FEValuesBase &) = delete;
+
/**
* Destructor.
*/
const typename Triangulation<dim, spacedim>::cell_iterator &cell);
private:
- /**
- * Copy constructor. Since objects of this class are not copyable, we make
- * it private, and also do not implement it.
- */
- FEValuesBase(const FEValuesBase &);
-
/**
* A cache for all possible FEValuesViews objects.
*/
*/
static const unsigned int structure_dimension = structdim;
+ /**
+ * Copy operator. These operators are usually used in a context like
+ * <tt>iterator a,b; *a=*b;</tt>. Presumably, the intent here is to copy the
+ * object pointed to
+ * by @p b to the object pointed to by @p a. However, the result of
+ * dereferencing an iterator is not an object but an accessor; consequently,
+ * this operation is not useful for iterators on triangulations.
+ * Consequently, this operator is declared as deleted and can not be used.
+ */
+ void
+ operator=(const TriaAccessorBase *) = delete;
+
protected:
/**
* Declare the data type that this accessor class expects to get passed from
*/
TriaAccessorBase(const TriaAccessorBase &);
- /**
- * Copy operator. These operators are usually used in a context like
- * <tt>iterator a,b; *a=*b;</tt>. Presumably, the intent here is to copy the
- * object pointed to
- * by @p b to the object pointed to by @p a. However, the result of
- * dereferencing an iterator is not an object but an accessor; consequently,
- * this operation is not useful for iterators on triangulations.
- * Consequently, this operator is declared as deleted and can not be used.
- */
- void
- operator=(const TriaAccessorBase *) = delete;
-
/**
* Copy operator. Since this is only called from iterators, do not return
* anything, since the iterator will return itself.
SparseMatrix &
operator=(const double d);
+ /**
+ * The copy constructor is deleted.
+ */
+ SparseMatrix(const SparseMatrix &) = delete;
+
+ /**
+ * The copy assignment operator is deleted.
+ */
+ SparseMatrix &
+ operator=(const SparseMatrix &) = delete;
+
/**
* Throw away the present matrix and generate one that has the same
* properties as if it were created by the constructor of this class with
const MPI::Vector & V = MPI::Vector()) const;
private:
- /**
- * Purposefully not implemented
- */
- SparseMatrix(const SparseMatrix &) = delete;
- /**
- * Purposefully not implemented
- */
- SparseMatrix &
- operator=(const SparseMatrix &) = delete;
-
/**
* Do the actual work for the respective reinit() function and the
* matching constructor, i.e. create a matrix. Getting rid of the previous
*/
explicit VectorBase(const Vec &v);
+ /**
+ * The copy assignment operator is deleted to avoid accidental usage with
+ * unexpected behavior.
+ */
+ VectorBase &
+ operator=(const VectorBase &) = delete;
+
/**
* Destructor
*/
const size_type * indices,
const PetscScalar *values,
const bool add_values);
-
- private:
- /**
- * Assignment operator. This is currently not implemented, so it is
- * deliberately left as private (and undefined) to prevent accidental
- * usage.
- */
- VectorBase &
- operator=(const VectorBase &) = delete;
};
*/
SolverGMRES(SolverControl &cn, const AdditionalData &data = AdditionalData());
+ /**
+ * The copy constructor is deleted.
+ */
+ SolverGMRES(const SolverGMRES<VectorType> &) = delete;
+
/**
* Solve the linear system $Ax=b$ for x.
*/
* Auxiliary matrix for inverting @p H
*/
FullMatrix<double> H1;
-
-
-private:
- /**
- * No copy constructor.
- */
- SolverGMRES(const SolverGMRES<VectorType> &);
};
/**
*/
virtual ~TimeStepBase() override = default;
+ /**
+ * The copy constructor is deleted to avoid shallow copies with unexpected
+ * behavior.
+ */
+ TimeStepBase(const TimeStepBase &) = delete;
+
+ /**
+ * The copy assignment operator is dleetd to avoid shallow copies winth
+ * unexpected behavior.
+ */
+ TimeStepBase &
+ operator=(const TimeStepBase &) = delete;
+
/**
* Reconstruct all the data that is needed for this time level to work. This
* function serves to reget all the variables and data structures to work
void
set_sweep_no(const unsigned int sweep_no);
-
- /**
- * Copy constructor. I can see no reason why someone might want to use it,
- * so I don't provide it. Since this class has pointer members, making it
- * private prevents the compiler to provide it's own, incorrect one if
- * anyone chose to copy such an object.
- */
- TimeStepBase(const TimeStepBase &) = delete;
-
- /**
- * Copy operator. I can see no reason why someone might want to use it, so I
- * don't provide it. Since this class has pointer members, making it private
- * prevents the compiler to provide it's own, incorrect one if anyone chose
- * to copy such an object.
- */
- TimeStepBase &
- operator=(const TimeStepBase &) = delete;
-
// make the manager object a friend
friend class TimeDependent;
};