Skip to content

Improve filledArray utility if type is not default constructible

Simon Praetorius requested to merge feature/filled-array into master

Summary

If a type is not default-constructible, it cannot be used to create a filled array with the utility Dune::filledArray. This MR fixes this issue by relying on copy-construction only.

Example

struct A {
  A(int) {}
}; // not default-constructible

// ...
auto a = Dune::filledArray<N>(A(42));  // ERROR before this MR, OK now
Edited by Simon Praetorius

Merge request reports