-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
This piece in PIConGPU seems to have been misunderstood and therefore misformatted by clang-format. I am not sure exactly why.
Admittedly, it is rather (and likely too) complicated anyhow. What is going on there:
ForEachIdx<IdxConfig<numCellsPerSuperCell, numWorkers>>is a functor type- We instantiate an object of this type by passing
workerIdxto its constructor, so the curly brace at the end of line 398 is call for constructor, not start of a block - Then we immediately call
operator()of the freshly constructed object in the same expression - And pass a lambda defined just there as its argument
Edit: so what the code with the current formatting boils down to (line 398 and start of line 399) is
Type{
constructor parameter}( lots of other stuff ...
and I suspect the other stuff was complicated and it did not recognize the constructor parameter.
cc @j-stephan
Metadata
Metadata
Assignees
Labels
No labels