From: Marc Fehling Date: Mon, 4 Mar 2019 23:05:15 +0000 (+0100) Subject: Explicitly set noexcept specifier for move constructor. X-Git-Tag: v9.1.0-rc1~305^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48954cca022288b739fb598b2be76cf15c5d28be;p=dealii.git Explicitly set noexcept specifier for move constructor. --- diff --git a/include/deal.II/hp/fe_collection.h b/include/deal.II/hp/fe_collection.h index c4668b89dc..4368627dff 100644 --- a/include/deal.II/hp/fe_collection.h +++ b/include/deal.II/hp/fe_collection.h @@ -135,8 +135,19 @@ namespace hp /** * Move constructor. - */ - FECollection(FECollection &&) = default; + * + * @note The implementation of standard datatypes may change with different + * libraries, so their move members may or may not be flagged non-throwing. + * We need to explicitly set the noexcept specifier according to its + * member variables to still get the performance benefits (and to satisfy + * clang-tidy). + */ + FECollection(FECollection &&) noexcept( + std::is_nothrow_move_constructible< + std::vector>>>::value + &&std::is_nothrow_move_constructible &, + const unsigned int)>>::value) = default; /** * Move assignment operator.