Skip to content

Improve the implementation of HasStaticSize

Simon Praetorius requested to merge feature/has-static-size into master

Summary

This MR cleans up the implementation of HasStaticSize by checking whether Hybrid::size() returns an integral constant. No need to reimplement staticSize. Additionally, it adds the utility traits StaticSizeOrZero that returns 0 if the types does not have a static size information. This is used in some other classes in dune-functions already. The original StaticSize utility is fixed to result in an substitution failure instead of a raw compiler error in case a type without static size information is passed.

Edited by Simon Praetorius

Merge request reports