Bugfix/fix inconsistent 1d dense vector conversions
This merge-request provides a test and a fix for bugs in DenseVector / FieldVector where the implementation "claims" to be convertible or assignable but instantiating the "advertised" assignment or conversion fails.
- std::is_convertible<From, To> is true_type, but the constructor "To(From)" fails
- std::is_assignable<To, From> is true_type, but "To = From" fails.
The bug is caused by catch-all templates in the 1d-version of FieldVector and the operator=() of DenseVector where "constructibility" resp. "assignability" by arbitray DenseVector implementations is claimed, but as that cannot work out anyway the actual call of the respective method triggers a compiler error.
The fix attacks this by requiring that DenseVector::value_type can be assigned/constructed by DenseVector::value_type. The buggy methods in questions do user operator, so this seems a reasonable fix.
The error is particularly triggered when nesting vector and trying to assign to a nested FieldVector from another nested DenseVector
Merge request reports
Activity
enabled an automatic merge when the pipeline for 69167d4d succeeds
@claus-justus.heine: Could you rebase on top of the current master and then this could be merged in my opinion.
mentioned in merge request !735 (merged)
mentioned in commit 5304152a
mentioned in commit 1802c531
mentioned in merge request !773 (merged)
mentioned in commit 504bd2d4