From: David Wells Date: Fri, 12 May 2017 00:16:44 +0000 (-0400) Subject: Use '= default' for some constructors. X-Git-Tag: v9.0.0-rc1~1602^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc76979750184b1386f506c81e2568b270af7ff2;p=dealii.git Use '= default' for some constructors. --- diff --git a/include/deal.II/algorithms/any_data.h b/include/deal.II/algorithms/any_data.h index 23a3027b32..e7bca13272 100644 --- a/include/deal.II/algorithms/any_data.h +++ b/include/deal.II/algorithms/any_data.h @@ -37,7 +37,7 @@ class AnyData : { public: /// Default constructor for empty object - AnyData(); + AnyData() = default; /// Number of stored data objects. unsigned int size() const; @@ -194,11 +194,6 @@ private: }; -inline -AnyData::AnyData() -{} - - unsigned int inline AnyData::size () const @@ -470,13 +465,3 @@ void AnyData::list(StreamType &os) const DEAL_II_NAMESPACE_CLOSE #endif - - - - - - - - - - diff --git a/include/deal.II/base/point.h b/include/deal.II/base/point.h index 8048390ca1..09578ff793 100644 --- a/include/deal.II/base/point.h +++ b/include/deal.II/base/point.h @@ -93,7 +93,7 @@ public: * Standard constructor. Creates an object that corresponds to the origin, * i.e., all coordinates are set to zero. */ - Point (); + Point () = default; /** * Convert a tensor to a point. @@ -249,13 +249,6 @@ public: #ifndef DOXYGEN -template -inline -Point::Point () -{} - - - template inline Point::Point (const Tensor<1,dim,Number> &t) diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index c685ef65a9..76897e81bd 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -529,7 +529,7 @@ public: /** * Default constructor. Creates a tensor with all entries equal to zero. */ - SymmetricTensor (); + SymmetricTensor () = default; /** * Constructor. Generate a symmetric tensor from a general one. Assumes that @@ -922,13 +922,6 @@ namespace internal -template -inline -SymmetricTensor::SymmetricTensor () -{} - - - template inline SymmetricTensor::SymmetricTensor (const Tensor<2,dim,Number> &t) diff --git a/include/deal.II/base/table.h b/include/deal.II/base/table.h index 4d98edf541..8a33ce7405 100644 --- a/include/deal.II/base/table.h +++ b/include/deal.II/base/table.h @@ -414,7 +414,7 @@ public: /** * Default constructor. Set all dimensions to zero. */ - TableBase (); + TableBase () = default; /** * Constructor. Initialize the array with the given dimensions in each index @@ -700,7 +700,7 @@ public: /** * Default constructor. Set all dimensions to zero. */ - Table (); + Table () = default; /** * Constructor. Pass down the given dimension to the base class. @@ -819,7 +819,7 @@ public: /** * Default constructor. Set all dimensions to zero. */ - Table (); + Table () = default; /** * Constructor. Pass down the given dimensions to the base class. @@ -1004,7 +1004,7 @@ public: /** * Default constructor. Set all dimensions to zero. */ - Table (); + Table () = default; /** * Constructor. Pass down the given dimensions to the base class. @@ -1138,7 +1138,7 @@ public: /** * Default constructor. Set all dimensions to zero. */ - Table (); + Table () = default; /** * Constructor. Pass down the given dimensions to the base class. @@ -1231,7 +1231,7 @@ public: /** * Default constructor. Set all dimensions to zero. */ - Table (); + Table () = default; /** * Constructor. Pass down the given dimensions to the base class. @@ -1325,7 +1325,7 @@ public: /** * Default constructor. Set all dimensions to zero. */ - Table (); + Table () = default; /** * Constructor. Pass down the given dimensions to the base class. @@ -1421,7 +1421,7 @@ public: /** * Default constructor. Set all dimensions to zero. */ - Table (); + Table () = default; /** * Constructor. Pass down the given dimensions to the base class. @@ -1524,7 +1524,7 @@ public: /** * Default constructor. Set all dimensions to zero. */ - TransposeTable (); + TransposeTable () = default; /** * Constructor. Pass down the given dimensions to the base class. @@ -1610,12 +1610,6 @@ protected: #ifndef DOXYGEN -template -TableBase::TableBase () -{} - - - template TableBase::TableBase (const TableIndices &sizes) { @@ -2172,13 +2166,6 @@ TableBase::el (const TableIndices &indices) -template -inline -Table<1,T>::Table () -{} - - - template inline Table<1,T>::Table (const unsigned int size) @@ -2271,11 +2258,6 @@ Table<1,T>::operator () (const TableIndices<1> &indices) //--------------------------------------------------------------------------- -template -inline -Table<2,T>::Table () -{} - template @@ -2434,14 +2416,6 @@ Table<2,T>::n_cols () const //--------------------------------------------------------------------------- - -template -inline -TransposeTable::TransposeTable () -{} - - - template inline TransposeTable::TransposeTable (const unsigned int size1, @@ -2539,12 +2513,6 @@ TransposeTable::n_cols () const //--------------------------------------------------------------------------- -template -inline -Table<3,T>::Table () -{} - - template inline @@ -2663,13 +2631,6 @@ Table<3,T>::operator () (const TableIndices<3> &indices) -template -inline -Table<4,T>::Table () -{} - - - template inline Table<4,T>::Table (const unsigned int size1, @@ -2782,13 +2743,6 @@ Table<4,T>::operator () (const TableIndices<4> &indices) -template -inline -Table<5,T>::Table () -{} - - - template inline Table<5,T>::Table (const unsigned int size1, @@ -2912,13 +2866,6 @@ Table<5,T>::operator () (const TableIndices<5> &indices) -template -inline -Table<6,T>::Table () -{} - - - template inline Table<6,T>::Table (const unsigned int size1, @@ -3053,13 +3000,6 @@ Table<6,T>::operator () (const TableIndices<6> &indices) -template -inline -Table<7,T>::Table () -{} - - - template inline Table<7,T>::Table (const unsigned int size1, diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index a1c48bc546..5ef206d7aa 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -291,8 +291,7 @@ namespace Threads /** * Default constructor. */ - Mutex () - {} + Mutex () = default; /** * Copy constructor. As discussed in this class's documentation, no state @@ -1223,7 +1222,7 @@ namespace Threads * this way, except for assigning it a thread object that holds data * created by the new_thread() functions. */ - Thread () {} + Thread () = default; /** * Copy constructor. @@ -3103,7 +3102,7 @@ namespace Threads * @post Using this constructor leaves the object in an unjoinable state, * i.e., joinable() will return false. */ - Task () {} + Task () = default; /** * Join the task represented by this object, i.e. wait for it to finish. diff --git a/include/deal.II/fe/block_mask.h b/include/deal.II/fe/block_mask.h index 33b79728bf..f436bd967c 100644 --- a/include/deal.II/fe/block_mask.h +++ b/include/deal.II/fe/block_mask.h @@ -77,7 +77,7 @@ public: * constructor results in a block mask that always returns true * whenever asked whether a block is selected. */ - BlockMask (); + BlockMask () = default; /** * Initialize an object of this type with a set of selected blocks specified @@ -230,11 +230,6 @@ std::ostream &operator << (std::ostream &out, // -------------------- inline functions --------------------- -inline -BlockMask::BlockMask() -{} - - inline BlockMask::BlockMask(const std::vector &block_mask) : diff --git a/include/deal.II/fe/component_mask.h b/include/deal.II/fe/component_mask.h index 018990f519..50c3822dbc 100644 --- a/include/deal.II/fe/component_mask.h +++ b/include/deal.II/fe/component_mask.h @@ -73,7 +73,7 @@ public: * calling this constructor results in a component mask that always returns * true whenever asked whether a component is selected. */ - ComponentMask (); + ComponentMask () = default; /** * Initialize an object of this type with a set of selected components @@ -238,11 +238,6 @@ std::ostream &operator << (std::ostream &out, // -------------------- inline functions --------------------- -inline -ComponentMask::ComponentMask() -{} - - inline ComponentMask::ComponentMask(const std::vector &component_mask) : diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index 3cb868ad46..d3f8b04d58 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -64,8 +64,7 @@ namespace internal /** * Default constructor. */ - type () - {} + type () = default; /** * Dummy constructor. Only level zero is allowed. diff --git a/include/deal.II/hp/q_collection.h b/include/deal.II/hp/q_collection.h index ebdd02c2f2..2dde30b5c7 100644 --- a/include/deal.II/hp/q_collection.h +++ b/include/deal.II/hp/q_collection.h @@ -50,7 +50,7 @@ namespace hp * Default constructor. Leads to an empty collection that can later be * filled using push_back(). */ - QCollection (); + QCollection () = default; /** * Conversion constructor. This constructor creates a QCollection from a @@ -176,13 +176,6 @@ namespace hp - template - inline - QCollection::QCollection () - {} - - - template inline QCollection::QCollection (const Quadrature &quadrature) diff --git a/include/deal.II/lac/block_matrix_base.h b/include/deal.II/lac/block_matrix_base.h index e775be4483..2171ae11dd 100644 --- a/include/deal.II/lac/block_matrix_base.h +++ b/include/deal.II/lac/block_matrix_base.h @@ -369,7 +369,7 @@ public: /** * Default constructor. */ - BlockMatrixBase (); + BlockMatrixBase () = default; /** * Destructor. @@ -1485,12 +1485,6 @@ namespace BlockMatrixIterators //--------------------------------------------------------------------------- - -template -inline -BlockMatrixBase::BlockMatrixBase () -{} - template inline BlockMatrixBase::~BlockMatrixBase () diff --git a/include/deal.II/lac/block_sparse_matrix.h b/include/deal.II/lac/block_sparse_matrix.h index 4297697e2e..c9eb6f8c20 100644 --- a/include/deal.II/lac/block_sparse_matrix.h +++ b/include/deal.II/lac/block_sparse_matrix.h @@ -87,7 +87,7 @@ public: * reinit(BlockSparsityPattern). The number of blocks per row and column are * then determined by that function. */ - BlockSparseMatrix (); + BlockSparseMatrix () = default; /** * Constructor. Takes the given matrix sparsity structure to represent the diff --git a/include/deal.II/lac/block_sparse_matrix.templates.h b/include/deal.II/lac/block_sparse_matrix.templates.h index de2d415560..e3e2d830ad 100644 --- a/include/deal.II/lac/block_sparse_matrix.templates.h +++ b/include/deal.II/lac/block_sparse_matrix.templates.h @@ -23,13 +23,6 @@ DEAL_II_NAMESPACE_OPEN - -template -BlockSparseMatrix::BlockSparseMatrix () -{} - - - template BlockSparseMatrix:: BlockSparseMatrix (const BlockSparsityPattern &sparsity) diff --git a/include/deal.II/lac/block_sparse_matrix_ez.h b/include/deal.II/lac/block_sparse_matrix_ez.h index 1ef96a9ed5..6c2b2b2941 100644 --- a/include/deal.II/lac/block_sparse_matrix_ez.h +++ b/include/deal.II/lac/block_sparse_matrix_ez.h @@ -60,7 +60,7 @@ public: /** * Default constructor. The result is an empty object with zero dimensions. */ - BlockSparseMatrixEZ (); + BlockSparseMatrixEZ () = default; /** * Constructor setting up an object with given number of block rows and diff --git a/include/deal.II/lac/block_sparse_matrix_ez.templates.h b/include/deal.II/lac/block_sparse_matrix_ez.templates.h index 1ce5c06cfe..6e3dabba64 100644 --- a/include/deal.II/lac/block_sparse_matrix_ez.templates.h +++ b/include/deal.II/lac/block_sparse_matrix_ez.templates.h @@ -23,13 +23,6 @@ DEAL_II_NAMESPACE_OPEN - -template -BlockSparseMatrixEZ::BlockSparseMatrixEZ () -{} - - - template BlockSparseMatrixEZ:: BlockSparseMatrixEZ (const unsigned int rows, diff --git a/include/deal.II/lac/block_vector_base.h b/include/deal.II/lac/block_vector_base.h index 8b9bfa1895..26ba82b821 100644 --- a/include/deal.II/lac/block_vector_base.h +++ b/include/deal.II/lac/block_vector_base.h @@ -551,7 +551,7 @@ public: /** * Default constructor. */ - BlockVectorBase (); + BlockVectorBase () = default; /** * Copy constructor. @@ -1453,13 +1453,6 @@ namespace internal -template -inline -BlockVectorBase::BlockVectorBase () -{} - - - template inline std::size_t diff --git a/include/deal.II/lac/diagonal_matrix.h b/include/deal.II/lac/diagonal_matrix.h index d745c4c7b0..2e80b0b398 100644 --- a/include/deal.II/lac/diagonal_matrix.h +++ b/include/deal.II/lac/diagonal_matrix.h @@ -52,7 +52,7 @@ public: /** * Constructor. */ - DiagonalMatrix(); + DiagonalMatrix() = default; /** * Initialize with a given vector by copying the content of the vector @@ -194,14 +194,6 @@ private: #ifndef DOXYGEN -template -DiagonalMatrix::DiagonalMatrix() - : - Subscriptor() -{} - - - template void DiagonalMatrix::clear() diff --git a/include/deal.II/lac/dynamic_sparsity_pattern.h b/include/deal.II/lac/dynamic_sparsity_pattern.h index 2b08664953..c92cbff606 100644 --- a/include/deal.II/lac/dynamic_sparsity_pattern.h +++ b/include/deal.II/lac/dynamic_sparsity_pattern.h @@ -598,11 +598,6 @@ private: */ std::vector entries; - /** - * Constructor. - */ - Line (); - /** * Add the given column number to this line. */ @@ -986,12 +981,6 @@ DynamicSparsityPattern::add_entries (const size_type row, -inline -DynamicSparsityPattern::Line::Line () -{} - - - inline types::global_dof_index DynamicSparsityPattern::row_length (const size_type row) const diff --git a/include/deal.II/lac/la_vector.h b/include/deal.II/lac/la_vector.h index 380954c434..82faf7f083 100644 --- a/include/deal.II/lac/la_vector.h +++ b/include/deal.II/lac/la_vector.h @@ -68,7 +68,7 @@ namespace LinearAlgebra /** * Constructor. Create a vector of dimension zero. */ - Vector(); + Vector() = default; /** * Copy constructor. Sets the dimension to that of the given vector and @@ -339,12 +339,6 @@ namespace LinearAlgebra /*@}*/ /*----------------------- Inline functions ----------------------------------*/ - template - inline - Vector::Vector() {} - - - template inline Vector::Vector(const Vector &V) diff --git a/include/deal.II/lac/petsc_parallel_block_vector.h b/include/deal.II/lac/petsc_parallel_block_vector.h index 8c5731900b..fcdf70db9f 100644 --- a/include/deal.II/lac/petsc_parallel_block_vector.h +++ b/include/deal.II/lac/petsc_parallel_block_vector.h @@ -87,7 +87,7 @@ namespace PETScWrappers /** * Default constructor. Generate an empty vector without any blocks. */ - BlockVector (); + BlockVector () = default; /** * Constructor. Generate a block vector with @p n_blocks blocks, each of @@ -281,13 +281,6 @@ namespace PETScWrappers /*----------------------- Inline functions ----------------------------------*/ - - inline - BlockVector::BlockVector () - {} - - - inline BlockVector::BlockVector (const unsigned int n_blocks, const MPI_Comm &communicator, diff --git a/include/deal.II/lac/solver_selector.h b/include/deal.II/lac/solver_selector.h index 383e083053..0c78fc44c7 100644 --- a/include/deal.II/lac/solver_selector.h +++ b/include/deal.II/lac/solver_selector.h @@ -106,7 +106,7 @@ public: /** * Constructor, filling in default values */ - SolverSelector (); + SolverSelector () = default; /** * Destructor @@ -242,11 +242,6 @@ private: /* --------------------- Inline and template functions ------------------- */ -template -SolverSelector::SolverSelector() -{} - - template SolverSelector::~SolverSelector() {} diff --git a/include/deal.II/lac/trilinos_parallel_block_vector.h b/include/deal.II/lac/trilinos_parallel_block_vector.h index 81b22369a8..6d2fd911a2 100644 --- a/include/deal.II/lac/trilinos_parallel_block_vector.h +++ b/include/deal.II/lac/trilinos_parallel_block_vector.h @@ -96,7 +96,7 @@ namespace TrilinosWrappers /** * Default constructor. Generate an empty vector without any blocks. */ - BlockVector (); + BlockVector () = default; /** * Constructor. Generate a block vector with as many blocks as there are @@ -306,14 +306,6 @@ namespace TrilinosWrappers /*----------------------- Inline functions ----------------------------------*/ - - - inline - BlockVector::BlockVector () - {} - - - inline BlockVector::BlockVector (const std::vector ¶llel_partitioning, const MPI_Comm &communicator) diff --git a/include/deal.II/lac/trilinos_precondition.h b/include/deal.II/lac/trilinos_precondition.h index f3ff0283a2..0822c5b9b8 100644 --- a/include/deal.II/lac/trilinos_precondition.h +++ b/include/deal.II/lac/trilinos_precondition.h @@ -1863,12 +1863,7 @@ namespace TrilinosWrappers * preconditioner to be handed to a smoother. This does nothing. */ struct AdditionalData - { - /** - * Constructor. - */ - AdditionalData () {} - }; + {}; /** * The matrix argument is ignored and here just for compatibility with more diff --git a/include/deal.II/lac/vector_memory.h b/include/deal.II/lac/vector_memory.h index f899c237d9..9968a50b96 100644 --- a/include/deal.II/lac/vector_memory.h +++ b/include/deal.II/lac/vector_memory.h @@ -176,7 +176,7 @@ public: /** * Constructor. */ - PrimitiveVectorMemory () {} + PrimitiveVectorMemory () = default; /** * Return a pointer to a new vector. The number of elements or their diff --git a/include/deal.II/meshworker/dof_info.h b/include/deal.II/meshworker/dof_info.h index 6daf750343..3de939b51b 100644 --- a/include/deal.II/meshworker/dof_info.h +++ b/include/deal.II/meshworker/dof_info.h @@ -171,7 +171,7 @@ namespace MeshWorker * constructor is not recommended, but it is needed for the arrays in * DoFInfoBox. */ - DoFInfo (); + DoFInfo () = default; /// Set up local block indices void set_block_indices (); diff --git a/include/deal.II/meshworker/dof_info.templates.h b/include/deal.II/meshworker/dof_info.templates.h index ee9b9c1cd5..2a11485db7 100644 --- a/include/deal.II/meshworker/dof_info.templates.h +++ b/include/deal.II/meshworker/dof_info.templates.h @@ -39,10 +39,6 @@ namespace MeshWorker } - template - DoFInfo::DoFInfo() - {} - template void diff --git a/include/deal.II/meshworker/vector_selector.h b/include/deal.II/meshworker/vector_selector.h index 1917b9d5f1..d0100eba5d 100644 --- a/include/deal.II/meshworker/vector_selector.h +++ b/include/deal.II/meshworker/vector_selector.h @@ -293,7 +293,8 @@ namespace MeshWorker /** * Constructor. */ - VectorData(); + VectorData() = default; + /** * Constructor using a prefilled VectorSelector */ @@ -359,7 +360,7 @@ namespace MeshWorker /** * Constructor. */ - MGVectorData(); + MGVectorData() = default; /** * Constructor using a prefilled VectorSelector diff --git a/include/deal.II/meshworker/vector_selector.templates.h b/include/deal.II/meshworker/vector_selector.templates.h index 24c73a8900..08781551be 100644 --- a/include/deal.II/meshworker/vector_selector.templates.h +++ b/include/deal.II/meshworker/vector_selector.templates.h @@ -88,11 +88,6 @@ namespace MeshWorker //----------------------------------------------------------------------// - template - VectorData::VectorData() - {} - - template VectorData::VectorData(const VectorSelector &s) : @@ -171,11 +166,6 @@ namespace MeshWorker //----------------------------------------------------------------------// - template - MGVectorData::MGVectorData() - {} - - template MGVectorData::MGVectorData(const VectorSelector &s) : diff --git a/include/deal.II/multigrid/mg_coarse.h b/include/deal.II/multigrid/mg_coarse.h index 0fa4ed6555..b14c4c74c1 100644 --- a/include/deal.II/multigrid/mg_coarse.h +++ b/include/deal.II/multigrid/mg_coarse.h @@ -278,7 +278,7 @@ public: /** * Constructor leaving an uninitialized object. */ - MGCoarseGridSVD (); + MGCoarseGridSVD () = default; /** * Initialize for a new matrix. This resets the dimensions to the @@ -549,11 +549,6 @@ MGCoarseGridHouseholder::operator() (const unsigned int /*le //--------------------------------------------------------------------------- -template -inline -MGCoarseGridSVD::MGCoarseGridSVD() -{} - template diff --git a/include/deal.II/multigrid/mg_matrix.h b/include/deal.II/multigrid/mg_matrix.h index 6c80f425e7..ec6c7b7eac 100644 --- a/include/deal.II/multigrid/mg_matrix.h +++ b/include/deal.II/multigrid/mg_matrix.h @@ -47,7 +47,7 @@ namespace mg /** * Default constructor for an empty object. */ - Matrix(); + Matrix() = default; /** * Constructor setting up pointers to the matrices in M by @@ -195,13 +195,6 @@ namespace mg - template - inline - Matrix::Matrix () - {} - - - template inline const PointerMatrixBase &