]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix internal::has_begin type trait used in FEEvaluation
authorDenis Davydov <davydden@gmail.com>
Tue, 26 Feb 2019 05:34:05 +0000 (06:34 +0100)
committerDenis Davydov <davydden@gmail.com>
Tue, 26 Feb 2019 05:34:44 +0000 (06:34 +0100)
include/deal.II/matrix_free/fe_evaluation.h
tests/matrix_free/fe_evaluation_type_traits.cc
tests/matrix_free/fe_evaluation_type_traits.with_trilinos=true.output

index 20b8249e0313ed1b4c5a7b652d9220cf247ddfa0..77e6975cff6d94f1348d116c6d46592de7f7def4 100644 (file)
@@ -3466,8 +3466,7 @@ namespace internal
 
   public:
     static constexpr bool value =
-      std::is_same<typename T::const_iterator,
-                   decltype(detect(std::declval<T>()))>::value;
+      !std::is_same<void, decltype(detect(std::declval<T>()))>::value;
   };
 
 
index 762da8b50d089c1f87d9451fcdb15effefe0610e..ffa65526980cdd7da0586d39cb9fbf07b74bc61b 100644 (file)
@@ -142,7 +142,8 @@ main()
     << std::endl
     << "TrilinosWrappers::MPI::Vector = "
     << internal::has_begin<TrilinosWrappers::MPI::Vector>::value << std::endl
-    << "Vector = " << internal::has_begin<Vector<double>>::value << std::endl;
+    << "Vector = " << internal::has_begin<Vector<double>>::value << std::endl
+    << "Dummy = " << internal::has_begin<Dummy<double>>::value << std::endl;
   // check is_vectorizable:
   deallog
     << "is_vectorizable:" << std::endl
index 801cf4191e206172de6e571beb64f419388c81a7..b7e821fc996fcc8f6507c1abff7ea3df6fcfb9db 100644 (file)
@@ -16,6 +16,7 @@ DEAL::has_begin:
 DEAL::LinearAlgebra::distributed::Vector = 1
 DEAL::TrilinosWrappers::MPI::Vector = 1
 DEAL::Vector = 1
+DEAL::Dummy = 0
 DEAL::is_vectorizable:
 DEAL::LinearAlgebra::distributed::Vector<double> && double = 1
 DEAL::LinearAlgebra::distributed::Vector<double> && float = 0

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.