-
- Downloads
[!664] Allow returning references in Std::visit()
Merge branch 'introduce-lfe-variant' into 'master' ref:core/dune-common Our own fallback implementation of Std::visit is currently not compatible with visitors returning lvalues. This is needed for the LocalFiniteElementVariant MR in dune-localfunctions. Notice that this also avoids an allocation that was used in Std::visit before. For the record: A further cleanup could optimize Hybrid::switchCase to use a real c switch statement, because there's rumors that compiler can optimize this much better than an `if ... else {} if...` sequence (current implementation) or an array of fuction pointers (another possible visit implementation). See merge request [!664] [!664]: gitlab.dune-project.org/core/dune-common/merge_requests/664
Please register or sign in to comment