Skip to content
Snippets Groups Projects
Commit b4f1adf8 authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

[bugfix] Make sure HasBracketOperator also detects integral_constant indices

parent bbd1be28
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -23,7 +23,7 @@ struct HasResize ...@@ -23,7 +23,7 @@ struct HasResize
); );
}; };
template<class Index = std::size_t> template<class Index>
struct HasBracketOperator struct HasBracketOperator
{ {
template<class T> template<class T>
...@@ -49,14 +49,14 @@ void resizeInitialize(Dune::BitSetVector<size, Alloc>& x, const Vector& y, bool ...@@ -49,14 +49,14 @@ void resizeInitialize(Dune::BitSetVector<size, Alloc>& x, const Vector& y, bool
} }
template<class TargetVector, class Vector, class Value, 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) void resizeInitialize(TargetVector& x, const Vector& y, const Value& value)
{ {
x = value; x = value;
} }
template<class TargetVector, class Vector, class 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) void resizeInitialize(TargetVector& x, const Vector& y, const Value& value)
{ {
namespace H = Dune::Hybrid; namespace H = Dune::Hybrid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment