From: Daniel Arndt Date: Fri, 4 Aug 2017 10:40:14 +0000 (+0200) Subject: Introduce a move assignment operator for Quadrature X-Git-Tag: v9.0.0-rc1~1363^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4692%2Fhead;p=dealii.git Introduce a move assignment operator for Quadrature --- diff --git a/doc/news/changes/minor/20170804DanielArndt b/doc/news/changes/minor/20170804DanielArndt new file mode 100644 index 0000000000..4f536ca07a --- /dev/null +++ b/doc/news/changes/minor/20170804DanielArndt @@ -0,0 +1,3 @@ +New: Quadrature has a (defaulted) move assignment operator. +
+(Daniel Arndt, 2017/08/04) diff --git a/include/deal.II/base/quadrature.h b/include/deal.II/base/quadrature.h index 20d0b0b65a..136c82d5f1 100644 --- a/include/deal.II/base/quadrature.h +++ b/include/deal.II/base/quadrature.h @@ -173,6 +173,12 @@ public: */ Quadrature &operator = (const Quadrature &); + /** + * Move assignment operator. Moves all data from another quadrature object + * to this object. + */ + Quadrature &operator = (Quadrature &&) = default; + /** * Test for equality of two quadratures. */ diff --git a/tests/base/quadrature_move.cc b/tests/base/quadrature_move_01.cc similarity index 100% rename from tests/base/quadrature_move.cc rename to tests/base/quadrature_move_01.cc diff --git a/tests/base/quadrature_move.output b/tests/base/quadrature_move_01.output similarity index 100% rename from tests/base/quadrature_move.output rename to tests/base/quadrature_move_01.output diff --git a/tests/base/quadrature_move_02.cc b/tests/base/quadrature_move_02.cc new file mode 100644 index 0000000000..0c6dd8154b --- /dev/null +++ b/tests/base/quadrature_move_02.cc @@ -0,0 +1,87 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2017 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +#include "../tests.h" +#include +#include + +#include + + +template