From 48954cca022288b739fb598b2be76cf15c5d28be Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Tue, 5 Mar 2019 00:05:15 +0100 Subject: [PATCH] Explicitly set noexcept specifier for move constructor. --- include/deal.II/hp/fe_collection.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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. -- 2.39.5