RedditPP Mascot

RedditPP

r/unrealengine • … • u/NottingHillNapolean

TActorIterator End Iterator Dereferencing Behavior

I'm using TActorIterator inside a std::find_if, using TActorIterator<MyActor>(EActorIteratorType::End) as the end iterator. I know if the find_if can't find anything, it returns the end iterator.

What happens if I dereference that end iterator? Ideally, that would yield a nullptr. That's what seems to happen, but will it always happen?

I'm working on a Windows game using MSVS 2019.

— 0