IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "16.0.1" )
MESSAGE(FATAL_ERROR "Intel compiler version 16.0.1 is not supported, please update to 16.0.2 or newer!")
ENDIF()
+
+
+#
+# Check for a regression in gcc-11.1.0 where a deleted move constructor
+# prevents templated constructor from being used. For details see
+#
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100644
+# https://github.com/dealii/dealii/issues/12244
+# https://github.com/dealii/dealii/pull/12246
+#
+# - Mathias Anselmann, Matthias Maier, David Wells, 2021
+#
+CHECK_CXX_COMPILER_BUG(
+ "
+ struct NonMovable {
+ NonMovable() = default;
+ NonMovable(NonMovable &&) = delete;
+ };
+ template <class T> struct Maybe {
+ NonMovable mMember;
+ template <typename U> Maybe(Maybe<U> &&) : mMember() {}
+ };
+ void unlucky(Maybe<int> &&x) { Maybe<int> var{(Maybe<int> &&) x}; }
+ int main() { return 0; }
+ "
+ DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG)
* For documentation see cmake/checks/check_03_compiler_bugs.cmake
*/
+#cmakedefine DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG
+
/***********************************************************************
* Compiler features:
*