New traversal implementation breaks intel compiler
The new implementation of tree traversal, especially the applyToTree
function, are nice, since quite compact and more clear than the old implementation. However, it does not yet work with the latest Intel compiler. (Ok, its not officially supported by dune, but I try to get every dune module running with icc)
I cannot say yet what's the problem, since I get internal compiler errors that point somewhere after the end of source files. But, one such internal error could be overcome, by removing one of the Hybrid::ifElse
statements, i.e.:
Instead of
Hybrid::ifElse(Std::bool_constant<Tree::isLeaf>{}, [&] (auto id) {
visitor.leaf(id(tree), treePath);
}, /* else... */ );
I moved this out of the function and added again the NodeTag argument and an overload for LeafNodeTag. (This goes a bit in the direction of the old implementation, but makes also the rest of the code much more readable, since all the id(tree)
calls reduce to tree
)
Tested with Intel 18.0.1 20171018. The first internal error pointed to traversal.hh:58 (corrected with the modification above), the second one happed when compiling dune-functions/stokes-taylorhood example (without a source location)