From b4f1adf866133f8e12b0a3ced17f1648e6e50c94 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Tue, 23 Aug 2016 09:43:48 +0200
Subject: [PATCH] [bugfix] Make sure HasBracketOperator also detects
 integral_constant indices

---
 dune/solvers/common/resize.hh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dune/solvers/common/resize.hh b/dune/solvers/common/resize.hh
index d425b95a..5bcda098 100644
--- a/dune/solvers/common/resize.hh
+++ b/dune/solvers/common/resize.hh
@@ -23,7 +23,7 @@ struct HasResize
   );
 };
 
-template<class Index = std::size_t>
+template<class Index>
 struct HasBracketOperator
 {
   template<class T>
@@ -49,14 +49,14 @@ void resizeInitialize(Dune::BitSetVector<size, Alloc>& x, const Vector& y, bool
 }
 
 template<class TargetVector, class Vector, class Value,
-  std::enable_if_t<not models<Dune::Solvers::Concept::HasBracketOperator<std::size_t>, TargetVector>(), int> = 0>
+  std::enable_if_t<not models<Dune::Solvers::Concept::HasBracketOperator<std::integral_constant<std::size_t,0> >, TargetVector>(), int> = 0>
 void resizeInitialize(TargetVector& x, const Vector& y, const Value& value)
 {
   x = value;
 }
 
 template<class TargetVector, class Vector, class Value,
-  std::enable_if_t< models<Dune::Solvers::Concept::HasBracketOperator<std::size_t>, TargetVector>(), int> = 0>
+  std::enable_if_t< models<Dune::Solvers::Concept::HasBracketOperator<std::integral_constant<std::size_t,0> >, TargetVector>(), int> = 0>
 void resizeInitialize(TargetVector& x, const Vector& y, const Value& value)
 {
   namespace H = Dune::Hybrid;
-- 
GitLab