Skip to content
Snippets Groups Projects
Commit eea340b7 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

[cleanup] Use concept check result directly

Since Dune::models() does now directly return an
std::integral_constant<bool,*> we can directly use
its result in ifElse().
parent 05fef93d
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -54,9 +54,7 @@ void resizeInitialize(TargetVector& x, const Vector& y, const Value& value)
namespace H = Dune::Hybrid;
auto size = H::size(y);
// H::ifElse(models<Concept::HasResize, TargetVector>(), [&](auto&& id) {
auto hasResize = std::integral_constant<bool, models<Concept::HasResize, TargetVector>()>();
H::ifElse(hasResize, [&](auto&& id) {
H::ifElse(models<Concept::HasResize, TargetVector>(), [&](auto&& id) {
id(x).resize(size);
}, [&](auto&& id) {
if (H::size(x) != size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment