Differences between forward declaration in file scope and as part of member declaration?

Hello I have been looking through some of the source code and noticed forward declarations being used at file scope in some places and as part of a member declaration in other cases.

Apart from the file scope case obviously being less cumbersome just like a ‘using namespace’ at the top is there some sort of technical difference?

Would there be any difference between a native c++ class and a UE class?

What about a UPROPERTY or UFUNCTION?

I have been trying to find posts about this topic but have been unsuccessful. I would also like to know the names of the 2 different approaches thanks!

File scope case:

#includes...

class Foo;

class Bar
{
    UFUNCTION(BlueprintCallable, Category = "Forward Declaration and some FooBar's")
    Foo* u_GetFoo();

    Foo* GetFoo();

    UPROPERTY()
    Foo* u_ptr;

    Foo* ptr;
}

Member declaration case:

#includes...

class Bar
{
    UFUNCTION(BlueprintCallable, Category = "Forward Declaration and some FooBar's")
    class Foo* u_GetFoo();

    class Foo* GetFoo();

    UPROPERTY()
    class Foo* u_ptr;

    class Foo* ptr;
}

FWIW I prefer declarations at file scope, and I’m gradually ‘fixing’ it whenever I see it in the code base. AFAIK there is no functional difference. File scope has the advantage that you see all unresolved dependencies right at the top. It helps keeping include lists clean.