From: Bruno Turcksin Date: Tue, 25 May 2021 01:22:27 +0000 (-0400) Subject: Fix warnings using clang 13.0 X-Git-Tag: v9.4.0-rc1~1328^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e665fad6d788b361fdf38dbeb0c4c77f64596b8b;p=dealii.git Fix warnings using clang 13.0 --- diff --git a/examples/step-47/step-47.cc b/examples/step-47/step-47.cc index e683a19ee6..53a03a1fea 100644 --- a/examples/step-47/step-47.cc +++ b/examples/step-47/step-47.cc @@ -316,6 +316,18 @@ namespace Step47 CopyData(const CopyData &) = default; + CopyData(CopyData &&) = default; + + + ~CopyData() = default; + + + CopyData &operator=(const CopyData &) = default; + + + CopyData &operator=(CopyData &&) = default; + + struct FaceData { FullMatrix cell_matrix; diff --git a/include/deal.II/dofs/dof_accessor.h b/include/deal.II/dofs/dof_accessor.h index ff2e614ec6..494facc68d 100644 --- a/include/deal.II/dofs/dof_accessor.h +++ b/include/deal.II/dofs/dof_accessor.h @@ -268,6 +268,23 @@ public: const int index, const DoFHandler * dof_handler); + /** + * Copy constructor. + */ + DoFAccessor(const DoFAccessor &) = + default; + + /** + * Move constructor. + */ + DoFAccessor(DoFAccessor + &&) noexcept = default; + + /** + * Destructor. + */ + ~DoFAccessor() = default; + /** * Conversion constructor. This constructor exists to make certain * constructs simpler to write in dimension independent code. For example, @@ -310,6 +327,13 @@ public: operator=(const DoFAccessor &da) = delete; + /** + * Move assignment operator. + */ + DoFAccessor & + operator=(DoFAccessor + &&) noexcept = default; + /** * @} */ @@ -851,6 +875,22 @@ public: DoFAccessor( const DoFAccessor &); + /** + * Copy constructor. + */ + DoFAccessor(const DoFAccessor<0, 1, spacedim, level_dof_access> &) = default; + + /** + * Move constructor. + */ + // NOLINTNEXTLINE OSX does not compile with noexcept + DoFAccessor(DoFAccessor<0, 1, spacedim, level_dof_access> &&) = default; + + /** + * Destructor. + */ + ~DoFAccessor() = default; + /** * Copy operator. These operators are usually used in a context like * iterator a,b; *a=*b;. Presumably, the intent here is to copy the @@ -863,6 +903,12 @@ public: DoFAccessor<0, 1, spacedim, level_dof_access> & operator=(const DoFAccessor<0, 1, spacedim, level_dof_access> &da) = delete; + /** + * Move assignment operator. + */ + DoFAccessor<0, 1, spacedim, level_dof_access> &operator =( + DoFAccessor<0, 1, spacedim, level_dof_access> &&) noexcept = default; + /** * @} */ @@ -1399,6 +1445,25 @@ public: explicit DoFCellAccessor( const DoFAccessor &); + /** + * Copy constructor. + */ + DoFCellAccessor( + const DoFCellAccessor &) = + default; + + /** + * Move constructor. + */ + DoFCellAccessor( + DoFCellAccessor + &&) noexcept = default; + + /** + * Destructor + */ + ~DoFCellAccessor() = default; + /** * Copy operator. These operators are usually used in a context like * iterator a,b; *a=*b;. Presumably, the intent here is to copy the @@ -1413,6 +1478,13 @@ public: const DoFCellAccessor &da) = delete; + /** + * Move assignment operator. + */ + DoFCellAccessor & + operator=(DoFCellAccessor + &&) noexcept = default; + /** * @} */ diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index 5b934b315d..ef9c57c6aa 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -313,6 +313,23 @@ namespace FEValuesViews Scalar(const FEValuesBase &fe_values_base, const unsigned int component); + /** + * Copy constructor. This is not a lightweight object so we don't allow + * copying and generate a compile-time error if this function is called. + */ + Scalar(const Scalar &) = delete; + + /** + * Move constructor. + */ + // NOLINTNEXTLINE OSX does not compile with noexcept + Scalar(Scalar &&) = default; + + /** + * Destructor. + */ + ~Scalar() = default; + /** * Copy operator. This is not a lightweight object so we don't allow * copying and generate a compile-time error if this function is called. @@ -320,6 +337,12 @@ namespace FEValuesViews Scalar & operator=(const Scalar &) = delete; + /** + * Move assignment operator. + */ + Scalar & + operator=(Scalar &&) noexcept = default; + /** * Return the value of the vector component selected by this view, for the * shape function and quadrature point selected by the arguments. @@ -916,6 +939,23 @@ namespace FEValuesViews Vector(const FEValuesBase &fe_values_base, const unsigned int first_vector_component); + /** + * Copy constructor. This is not a lightweight object so we don't allow + * copying and generate a compile-time error if this function is called. + */ + Vector(const Vector &) = delete; + + /** + * Move constuctor. + */ + // NOLINTNEXTLINE OSX does not compile with noexcept + Vector(Vector &&) = default; + + /** + * Destructor. + */ + ~Vector() = default; + /** * Copy operator. This is not a lightweight object so we don't allow * copying and generate a compile-time error if this function is called. @@ -923,6 +963,13 @@ namespace FEValuesViews Vector & operator=(const Vector &) = delete; + /** + * Move assignment operator. + */ + // NOLINTNEXTLINE OSX does not compile with noexcept + Vector & + operator=(Vector &&) = default; // NOLINT + /** * Return the value of the vector components selected by this view, for * the shape function and quadrature point selected by the arguments. @@ -1555,6 +1602,18 @@ namespace FEValuesViews SymmetricTensor(const FEValuesBase &fe_values_base, const unsigned int first_tensor_component); + /** + * Copy constructor. This is not a lightweight object so we don't allow + * copying and generate a compile-time error if this function is called. + */ + SymmetricTensor(const SymmetricTensor<2, dim, spacedim> &) = delete; + + /** + * Move constructor. + */ + // NOLINTNEXTLINE OSX does not compile with noexcept + SymmetricTensor(SymmetricTensor<2, dim, spacedim> &&) = default; + /** * Copy operator. This is not a lightweight object so we don't allow * copying and generate a compile-time error if this function is called. @@ -1562,6 +1621,12 @@ namespace FEValuesViews SymmetricTensor & operator=(const SymmetricTensor<2, dim, spacedim> &) = delete; + /** + * Move assignment operator. + */ + SymmetricTensor & + operator=(SymmetricTensor<2, dim, spacedim> &&) noexcept = default; + /** * Return the value of the vector components selected by this view, for * the shape function and quadrature point selected by the arguments. @@ -1879,6 +1944,23 @@ namespace FEValuesViews */ Tensor(); + /** + * Copy constructor. This is not a lightweight object so we don't allow + * copying and generate a compile-time error if this function is called. + */ + Tensor(const Tensor<2, dim, spacedim> &) = delete; + + /** + * Move constructor. + */ + // NOLINTNEXTLINE OSX does not compile with noexcept + Tensor(Tensor<2, dim, spacedim> &&) = default; + + /** + * Destructor. + */ + ~Tensor() = default; + /** * Constructor for an object that represents (dim*dim) * components of a FEValuesBase object (or of one of the classes derived @@ -1899,6 +1981,12 @@ namespace FEValuesViews Tensor & operator=(const Tensor<2, dim, spacedim> &) = delete; + /** + * Move assignment operator. + */ + // NOLINTNEXTLINE + Tensor &operator=(Tensor<2, dim, spacedim> &&) = default; + /** * Return the value of the vector components selected by this view, for * the shape function and quadrature point selected by the arguments. diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index 8d30f80bb6..863ce4401b 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -2878,6 +2878,22 @@ public: template CellAccessor(const TriaAccessor &); + /** + * Copy constructor. + */ + CellAccessor(const CellAccessor &) = default; + + /** + * Move constructor. + */ + // NOLINTNEXTLINE OSX does not compile with noexcept + CellAccessor(CellAccessor &&) = default; + + /** + * Destructor. + */ + ~CellAccessor() = default; + /** * Copy operator. These operators are usually used in a context like * iterator a,b; *a=*b;. Presumably, the intent here is to copy the @@ -2887,9 +2903,16 @@ public: * this operation is not useful for iterators on triangulations. * Consequently, this operator is declared as deleted and can not be used. */ - void + CellAccessor & operator=(const CellAccessor &) = delete; + /** + * Move assignment operator. + */ + // NOLINTNEXTLINE OSX does not compile with noexcept + CellAccessor & + operator=(CellAccessor &&) = default; // NOLINT + /** * @} */ diff --git a/include/deal.II/matrix_free/dof_info.h b/include/deal.II/matrix_free/dof_info.h index 2d84bcad13..cd5b0344e3 100644 --- a/include/deal.II/matrix_free/dof_info.h +++ b/include/deal.II/matrix_free/dof_info.h @@ -122,6 +122,28 @@ namespace internal */ DoFInfo(const DoFInfo &) = default; + /** + * Move constructor. + */ + DoFInfo(DoFInfo &&) noexcept = default; + + /** + * Destructor. + */ + ~DoFInfo() = default; + + /** + * Copy assignment operator. + */ + DoFInfo & + operator=(const DoFInfo &) = default; + + /** + * Move assignment operator. + */ + DoFInfo & + operator=(DoFInfo &&) noexcept = default; + /** * Clear all data fields in this class. */