* Move constructor. Create a new aligned vector by stealing the contents of
* @p vec.
*/
- AlignedVector (AlignedVector<T> &&vec);
+ AlignedVector (AlignedVector<T> &&vec) noexcept;
/**
* Assignment to the input vector @p vec.
* Move assignment operator.
*/
AlignedVector &
- operator = (AlignedVector<T> &&vec);
+ operator = (AlignedVector<T> &&vec) noexcept;
/**
* Change the size of the vector. It keeps old elements previously available
template < class T >
inline
-AlignedVector<T>::AlignedVector (AlignedVector<T> &&vec)
- :
- _data (vec._data),
- _end_data (vec._end_data),
- _end_allocated (vec._end_allocated)
+AlignedVector<T>::AlignedVector (AlignedVector<T> &&vec) noexcept
+:
+_data (vec._data),
+ _end_data (vec._end_data),
+ _end_allocated (vec._end_allocated)
{
vec._data = nullptr;
vec._end_data = nullptr;
template < class T >
inline
AlignedVector<T> &
-AlignedVector<T>::operator = (AlignedVector<T> &&vec)
+AlignedVector<T>::operator = (AlignedVector<T> &&vec) noexcept
{
clear();
* Move constructor. Create a new IndexSet by transferring the internal data
* of the input set.
*/
- IndexSet (IndexSet &&is);
+ IndexSet (IndexSet &&is) noexcept;
/**
* Move assignment operator. Transfer the internal data of the input set into
* the current one.
*/
- IndexSet &operator= (IndexSet &&is);
+ IndexSet &operator= (IndexSet &&is) noexcept;
#ifdef DEAL_II_WITH_TRILINOS
/**
inline
-IndexSet::IndexSet (IndexSet &&is)
- :
- ranges (std::move(is.ranges)),
- is_compressed (is.is_compressed),
- index_space_size (is.index_space_size),
- largest_range (is.largest_range)
+IndexSet::IndexSet (IndexSet &&is) noexcept
+:
+ranges (std::move(is.ranges)),
+ is_compressed (is.is_compressed),
+ index_space_size (is.index_space_size),
+ largest_range (is.largest_range)
{
is.ranges.clear ();
is.is_compressed = true;
inline
-IndexSet &IndexSet::operator= (IndexSet &&is)
+IndexSet &IndexSet::operator= (IndexSet &&is) noexcept
{
ranges = std::move (is.ranges);
is_compressed = is.is_compressed;
* Move constructor. Construct a new quadrature object by transferring the
* internal data of another quadrature object.
*/
- Quadrature (Quadrature<dim> &&) = default;
+ Quadrature (Quadrature<dim> &&) noexcept = default;
/**
* Construct a quadrature formula from given vectors of quadrature points
* Move assignment operator. Moves all data from another quadrature object
* to this object.
*/
- Quadrature &operator = (Quadrature<dim> &&) = default;
+ Quadrature &operator = (Quadrature<dim> &&) = default; // NOLINT
/**
* Test for equality of two quadratures.
* Move constructor. We cannot rely on the move constructor for `Quadrature`,
* since it does not know about the additional member `fraction` of this class.
*/
- QGaussLogR(QGaussLogR<dim> &&) = default;
+ QGaussLogR(QGaussLogR<dim> &&) noexcept = default;
protected:
/**
* Move constructor. We cannot rely on the move constructor for `Quadrature`,
* since it does not know about the additional member `ep` of this class.
*/
- QGaussRadauChebyshev(QGaussRadauChebyshev<dim> &&) = default;
+ QGaussRadauChebyshev(QGaussRadauChebyshev<dim> &&) noexcept = default;
private:
const EndPoint ep;
* An object inheriting from Subscriptor can only be moved if no other
* objects are subscribing to it.
*/
- Subscriptor(Subscriptor &&);
+ Subscriptor(Subscriptor &&) noexcept;
/**
* Destructor, asserting that the counter is zero.
*
* Asserts that the counter for the moved object is zero.
*/
- Subscriptor &operator = (Subscriptor &&);
+ Subscriptor &operator = (Subscriptor &&) noexcept;
/**
* Subscribes a user of the object. The subscriber may be identified by text
/**
* Move constructor. Transfers the contents of another Table.
*/
- TableBase (TableBase<N,T> &&src);
+ TableBase (TableBase<N,T> &&src) noexcept;
/**
* Destructor. Free allocated memory.
* Move assignment operator. Transfer all elements of <tt>src</tt> into the
* table.
*/
- TableBase<N,T> &operator = (TableBase<N,T> &&src);
+ TableBase<N,T> &operator = (TableBase<N,T> &&src) noexcept;
/**
* Test for equality of two tables.
template <int N, typename T>
-TableBase<N,T>::TableBase (TableBase<N,T> &&src)
- :
- Subscriptor (std::move(src)),
- values (std::move(src.values)),
- table_size (src.table_size)
+TableBase<N,T>::TableBase (TableBase<N,T> &&src) noexcept
+:
+Subscriptor (std::move(src)),
+ values (std::move(src.values)),
+ table_size (src.table_size)
{
src.table_size = TableIndices<N>();
}
template <int N, typename T>
inline
TableBase<N,T> &
-TableBase<N,T>::operator = (TableBase<N,T> &&m)
+TableBase<N,T>::operator = (TableBase<N,T> &&m) noexcept
{
static_cast<Subscriptor &>(*this) = std::move(m);
values = std::move(m.values);
/**
* Move constructor.
*/
- FiniteElement (FiniteElement<dim, spacedim> &&) = default;
+ FiniteElement (FiniteElement<dim, spacedim> &&) = default; // NOLINT
/**
* Copy constructor.
/**
* Move constructor.
*/
- FESystem (FESystem<dim,spacedim> &&) = default;
+ FESystem (FESystem<dim,spacedim> &&) = default; // NOLINT
/**
* Destructor.
{
CellId::binary_type value;
ar &value;
- cell_ids.emplace_back(std::move(value));
+ cell_ids.emplace_back(value);
}
ar &data;
}
* Create a new triangulation by stealing the internal data of another
* triangulation.
*/
- Triangulation (Triangulation<dim, spacedim> &&tria);
+ Triangulation (Triangulation<dim, spacedim> &&tria) noexcept;
/**
* Move assignment operator.
*/
- Triangulation &operator = (Triangulation<dim, spacedim> &&tria);
+ Triangulation &operator = (Triangulation<dim, spacedim> &&tria) noexcept;
/**
* Delete the object and all levels of the hierarchy.
/**
* Move constructor.
*/
- FECollection (FECollection<dim,spacedim> &&fe_collection) = default;
+ FECollection (FECollection<dim,spacedim> &&fe_collection) noexcept = default;
/**
* Move assignment operator.
*/
FECollection<dim, spacedim> &
- operator= (FECollection<dim,spacedim> &&fe_collection) = default;
+ operator= (FECollection<dim,spacedim> &&fe_collection) = default; // NOLINT
/**
* Add a finite element. This function generates a copy of the given
* Move constructor. Initialize a new object by stealing the internal data of
* another BlockIndices object.
*/
- BlockIndices (BlockIndices &&b);
+ BlockIndices (BlockIndices &&b) noexcept;
/**
* Copy constructor.
* Move assignment operator. Move another BlockIndices object onto the
* current one by transferring its contents.
*/
- BlockIndices &operator = (BlockIndices &&);
+ BlockIndices &operator = (BlockIndices &&) noexcept;
/**
* Compare whether two objects are the same, i.e. whether the number of
inline
-BlockIndices::BlockIndices (BlockIndices &&b)
- :
- n_blocks(b.n_blocks),
- start_indices(std::move(b.start_indices))
+BlockIndices::BlockIndices (BlockIndices &&b) noexcept
+:
+n_blocks(b.n_blocks),
+ start_indices(std::move(b.start_indices))
{
b.n_blocks = 0;
b.start_indices = std::vector<size_type>(1, 0);
inline
BlockIndices &
-BlockIndices::operator = (BlockIndices &&b)
+BlockIndices::operator = (BlockIndices &&b) noexcept
{
start_indices = std::move(b.start_indices);
n_blocks = b.n_blocks;
* Move constructor. Creates a new vector by stealing the internal data of
* the given argument vector.
*/
- BlockVector (BlockVector<Number> &&/*v*/) = default;
+ BlockVector (BlockVector<Number> &&/*v*/) noexcept = default;
/**
* Copy constructor taking a BlockVector of another data type. This will
* Move the given vector. This operator replaces the present vector with
* the contents of the given argument vector.
*/
- BlockVector<Number> &operator= (BlockVector<Number> &&/*v*/) = default;
+ BlockVector<Number> &operator= (BlockVector<Number> &&/*v*/) = default; // NOLINT
/**
* Copy operator for template arguments of different types. Resize the
* object if the underlying <code>VectorType</code> is move-constructible,
* otherwise they are copied.
*/
- BlockVectorBase (BlockVectorBase &&/*V*/) = default;
+ BlockVectorBase (BlockVectorBase &&/*V*/) noexcept = default;
/**
* Update internal structures after resizing vectors. Whenever you reinited
* vector into the current object if `VectorType` is
* move-constructible, otherwise copy them.
*/
- BlockVectorBase &operator= (BlockVectorBase &&/*V*/) = default;
+ BlockVectorBase &operator= (BlockVectorBase &&/*V*/) = default; // NOLINT
/**
* Copy operator for template arguments of different types.
* Move construction allows an object to be returned from a function or
* packed into a tuple even when the class cannot be copy-constructed.
*/
- SparseMatrix (SparseMatrix<number> &&m);
+ SparseMatrix (SparseMatrix<number> &&m) noexcept;
/**
* Constructor. Takes the given matrix sparsity structure to represent the
* Move assignment operator. This operator replaces the present matrix with
* @p m by transferring the internal data of @p m.
*/
- SparseMatrix<number> &operator = (SparseMatrix<number> &&m);
+ SparseMatrix<number> &operator = (SparseMatrix<number> &&m) noexcept;
/**
* Copy operator: initialize the matrix with the identity matrix. This
template <typename number>
-SparseMatrix<number>::SparseMatrix (SparseMatrix<number> &&m)
- :
- Subscriptor(std::move(m)),
- cols(m.cols),
- val(std::move(m.val)),
- max_len(m.max_len)
+SparseMatrix<number>::SparseMatrix (SparseMatrix<number> &&m) noexcept
+:
+Subscriptor(std::move(m)),
+ cols(m.cols),
+ val(std::move(m.val)),
+ max_len(m.max_len)
{
m.cols = nullptr;
m.val = nullptr;
template <typename number>
SparseMatrix<number> &
-SparseMatrix<number>::operator = (SparseMatrix<number> &&m)
+SparseMatrix<number>::operator = (SparseMatrix<number> &&m) noexcept
{
cols = m.cols;
val = std::move(m.val);
* Move constructor. Creates a new vector by stealing the internal data
* of the vector @p v.
*/
- BlockVector (BlockVector &&v);
+ BlockVector (BlockVector &&v) noexcept;
/**
* Creates a block vector consisting of <tt>num_blocks</tt> components,
* Move the given vector. This operator replaces the present vector with
* @p v by efficiently swapping the internal data structures.
*/
- BlockVector &operator= (BlockVector &&v);
+ BlockVector &operator= (BlockVector &&v) noexcept;
/**
* Another copy function. This one takes a deal.II block vector and
inline
- BlockVector::BlockVector (BlockVector &&v)
+ BlockVector::BlockVector (BlockVector &&v) noexcept
{
// initialize a minimal, valid object and swap
reinit (0);
* Move constructor. Create a new sparse matrix by stealing the internal
* data.
*/
- SparseMatrix (SparseMatrix &&other);
+ SparseMatrix (SparseMatrix &&other) noexcept;
/**
* Copy constructor is deleted.
* Move constructor. Create a new sparse matrix by stealing the internal
* data.
*/
- SparsityPattern (SparsityPattern &&other);
+ SparsityPattern (SparsityPattern &&other) noexcept;
/**
* Copy constructor. Sets the calling sparsity pattern to be the same as
* Move constructor. Creates a new vector by stealing the internal data
* of the vector @p v.
*/
- Vector (Vector &&v);
+ Vector (Vector &&v) noexcept;
/**
* Destructor.
* Move the given vector. This operator replaces the present vector with
* @p v by efficiently swapping the internal data structures.
*/
- Vector &operator= (Vector &&v);
+ Vector &operator= (Vector &&v) noexcept;
/**
* Another copy function. This one takes a deal.II vector and copies it
* Move constructor. Creates a new vector by stealing the internal data of
* the vector @p v.
*/
- Vector (Vector<Number> &&v);
+ Vector (Vector<Number> &&v) noexcept;
/**
* Copy constructor taking a vector of another data type. This will fail if
* the internal data of the vector @p v and resets @p v to the state it would
* have after being newly default-constructed.
*/
- Vector<Number> &operator= (Vector<Number> &&v);
+ Vector<Number> &operator= (Vector<Number> &&v) noexcept;
/**
* Copy the given vector. Resize the present vector if necessary.
template <typename Number>
-Vector<Number>::Vector (Vector<Number> &&v)
- :
- Subscriptor(std::move(v)),
- vec_size(v.vec_size),
- max_vec_size(v.max_vec_size),
- values(std::move(v.values)),
- thread_loop_partitioner(std::move(v.thread_loop_partitioner))
+Vector<Number>::Vector (Vector<Number> &&v) noexcept
+:
+Subscriptor(std::move(v)),
+ vec_size(v.vec_size),
+ max_vec_size(v.max_vec_size),
+ values(std::move(v.values)),
+ thread_loop_partitioner(std::move(v.thread_loop_partitioner))
{
v.vec_size = 0;
v.max_vec_size = 0;
template <typename Number>
inline
Vector<Number> &
-Vector<Number>::operator= (Vector<Number> &&v)
+Vector<Number>::operator= (Vector<Number> &&v) noexcept
{
Subscriptor::operator=(std::move(v));
* Move constructor: this creates a new Pointer by stealing the internal
* data owned by @p p.
*/
- Pointer(Pointer &&p) = default;
+ Pointer(Pointer &&p) noexcept = default;
/**
* Move operator: this releases the vector owned by the current Pointer
* and then steals the internal data owned by @p p.
*/
- Pointer &operator = (Pointer &&p) = default;
+ Pointer &operator = (Pointer &&p) noexcept = default;
/**
* Constructor. This constructor automatically allocates a vector from
* Move constructor for Particle, creates a particle from an existing
* one by stealing its state.
*/
- Particle (Particle<dim,spacedim> &&particle);
+ Particle (Particle<dim,spacedim> &&particle) noexcept;
/**
* Copy assignment operator.
/**
* Move assignment operator.
*/
- Particle<dim,spacedim> &operator=(Particle<dim,spacedim> &&particle);
+ Particle<dim,spacedim> &operator=(Particle<dim,spacedim> &&particle) noexcept;
/**
* Destructor. Releases the property handle if it is valid, and
-Subscriptor::Subscriptor (Subscriptor &&subscriptor)
- :
- counter(0),
- object_info (subscriptor.object_info)
+Subscriptor::Subscriptor (Subscriptor &&subscriptor) noexcept
+:
+counter(0),
+ object_info (subscriptor.object_info)
{
subscriptor.check_no_subscribers();
}
-Subscriptor &Subscriptor::operator = (Subscriptor &&s)
+Subscriptor &Subscriptor::operator = (Subscriptor &&s) noexcept
{
s.check_no_subscribers();
object_info = s.object_info;
template <int dim, int spacedim>
Triangulation<dim, spacedim>::
-Triangulation (Triangulation<dim, spacedim> &&tria)
- :
- Subscriptor(tria),
- smooth_grid(tria.smooth_grid),
- periodic_face_pairs_level_0(std::move(tria.periodic_face_pairs_level_0)),
- periodic_face_map(std::move(tria.periodic_face_map)),
- levels(std::move(tria.levels)),
- faces(std::move(tria.faces)),
- vertices(std::move(tria.vertices)),
- vertices_used(std::move(tria.vertices_used)),
- manifold(std::move(tria.manifold)),
- anisotropic_refinement(tria.anisotropic_refinement),
- check_for_distorted_cells(tria.check_for_distorted_cells),
- number_cache(tria.number_cache),
- vertex_to_boundary_id_map_1d(std::move(tria.vertex_to_boundary_id_map_1d)),
- vertex_to_manifold_id_map_1d(std::move(tria.vertex_to_manifold_id_map_1d))
+Triangulation (Triangulation<dim, spacedim> &&tria) noexcept
+:
+Subscriptor(std::move(tria)),
+ smooth_grid(tria.smooth_grid),
+ periodic_face_pairs_level_0(std::move(tria.periodic_face_pairs_level_0)),
+ periodic_face_map(std::move(tria.periodic_face_map)),
+ levels(std::move(tria.levels)),
+ faces(std::move(tria.faces)),
+ vertices(std::move(tria.vertices)),
+ vertices_used(std::move(tria.vertices_used)),
+ manifold(std::move(tria.manifold)),
+ anisotropic_refinement(tria.anisotropic_refinement),
+ check_for_distorted_cells(tria.check_for_distorted_cells),
+ number_cache(std::move(tria.number_cache)),
+ vertex_to_boundary_id_map_1d(std::move(tria.vertex_to_boundary_id_map_1d)),
+ vertex_to_manifold_id_map_1d(std::move(tria.vertex_to_manifold_id_map_1d))
{
tria.number_cache = internal::Triangulation::NumberCache<dim>();
}
template <int dim, int spacedim>
Triangulation<dim, spacedim> &
-Triangulation<dim, spacedim>::operator= (Triangulation<dim, spacedim> &&tria)
+Triangulation<dim, spacedim>::operator= (Triangulation<dim, spacedim> &&tria) noexcept
{
Subscriptor::operator=(std::move(tria));
BlockVector &
- BlockVector::operator= (BlockVector &&v)
+ BlockVector::operator= (BlockVector &&v) noexcept
{
swap(v);
return *this;
- SparseMatrix::SparseMatrix (SparseMatrix &&other)
- :
- column_space_map(std::move(other.column_space_map)),
- matrix(std::move(other.matrix)),
- nonlocal_matrix(std::move(other.nonlocal_matrix)),
- nonlocal_matrix_exporter(std::move(other.nonlocal_matrix_exporter)),
- last_action(other.last_action),
- compressed(other.compressed)
+ SparseMatrix::SparseMatrix (SparseMatrix &&other) noexcept
+:
+ column_space_map(std::move(other.column_space_map)),
+ matrix(std::move(other.matrix)),
+ nonlocal_matrix(std::move(other.nonlocal_matrix)),
+ nonlocal_matrix_exporter(std::move(other.nonlocal_matrix_exporter)),
+ last_action(other.last_action),
+ compressed(other.compressed)
{
other.last_action = Zero;
other.compressed = false;
- SparsityPattern::SparsityPattern (SparsityPattern &&other)
- :
- Subscriptor(std::move(other)),
- column_space_map(std::move(other.column_space_map)),
- graph(std::move(other.graph)),
- nonlocal_graph(std::move(other.nonlocal_graph))
+ SparsityPattern::SparsityPattern (SparsityPattern &&other) noexcept
+:
+ Subscriptor(std::move(other)),
+ column_space_map(std::move(other.column_space_map)),
+ graph(std::move(other.graph)),
+ nonlocal_graph(std::move(other.nonlocal_graph))
{}
- Vector::Vector (Vector &&v)
- : Vector()
+ Vector::Vector (Vector &&v) noexcept
+:
+ Vector()
{
// initialize a minimal, valid object and swap
swap(v);
- Vector &Vector::operator= (Vector &&v)
+ Vector &Vector::operator= (Vector &&v) noexcept
{
swap(v);
return *this;
template <int dim, int spacedim>
- Particle<dim,spacedim>::Particle (Particle<dim,spacedim> &&particle)
- :
- location (particle.location),
- reference_location(particle.reference_location),
- id (particle.id),
- property_pool(particle.property_pool),
- properties(particle.properties)
+ Particle<dim,spacedim>::Particle (Particle<dim,spacedim> &&particle) noexcept
+:
+ location (std::move(particle.location)),
+ reference_location(std::move(particle.reference_location)),
+ id (std::move(particle.id)),
+ property_pool(std::move(particle.property_pool)),
+ properties(std::move(particle.properties))
{
particle.properties = PropertyPool::invalid_handle;
}
template <int dim, int spacedim>
Particle<dim,spacedim> &
- Particle<dim,spacedim>::operator=(Particle<dim,spacedim> &&particle)
+ Particle<dim,spacedim>::operator=(Particle<dim,spacedim> &&particle) noexcept
{
if (this != &particle)
{