]> https://gitweb.dealii.org/ - dealii.git/commitdiff
consistently for non-void in internal::has_local_element
authorDenis Davydov <davydden@gmail.com>
Tue, 26 Feb 2019 16:12:21 +0000 (17:12 +0100)
committerDenis Davydov <davydden@gmail.com>
Tue, 26 Feb 2019 16:12:21 +0000 (17:12 +0100)
include/deal.II/matrix_free/fe_evaluation.h

index 77e6975cff6d94f1348d116c6d46592de7f7def4..ac87eea988cdf7b8b06ab26c7a51fbcdf053650c 100644 (file)
@@ -3420,12 +3420,11 @@ namespace internal
     detect(const U &);
 
   public:
-    // finally here we check if our detector has return type same as
+    // finally here we check if our detector has non-void return type
     // T::value_type. This will happen if compiler can use second detector,
     // otherwise SFINAE let it work with the more general first one that is void
     static constexpr bool value =
-      std::is_same<typename T::value_type,
-                   decltype(detect(std::declval<T>()))>::value;
+      !std::is_same<void, decltype(detect(std::declval<T>()))>::value;
   };
 
 
@@ -3452,7 +3451,7 @@ namespace internal
 
 
   // same as above to check
-  // T::const_iterator T::begin() const
+  // ... T::begin() const
   template <typename T>
   struct has_begin
   {

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.