> > It's in a template which is nested in a second function (topNIndex) > and it accesses a function(indirectLess) nested in that function by > alias. So isn't that the same as: > -topNIndex > ----indirectLess > ----percolateDown{indirectLess();} <--- nested function > > (we have) > -topNIndex > ----indirectLess > ----BinaryHeap(alias indirectLess) > --------percolateDown{indirectLess()}; <--- is TREE_PUBLIC >
I should add that indirectLess is a real nested function - not static - so it could access variables defined in topNIndex. This is why I think percolateDown can't be TREE_PUBLIC: It calls a function which is nested in another function and can access variables in that function. So percolateDown can indirectly access topNIndex's variables and is therefore, as far as I understand, nested.