How to use C + + actor iterator to realize the function of blueprint for each loop and provide it to blueprint

Is this a bit less expensive than for each loop? Or is there a better solution?