Problem with generated header?

So first of all I must say that I’m not an experienced c++ programmer. So maybe I just don’t understand something. But I was going through the shootergame code.
Then in the in the ShooterProjectile.cpp I found the definition

void AShooterProjectile::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const

{…}

Then I took a look at the corresponding headerfile and was suprised that no overriding function was declared there.

So I thought maybe you don’t have to redeclare virtual functions. But for better reading I still wanted to redeclare the GetLifetimeReplicatedProps function. So I put the following in the corresponding headerfile

virtual void GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const OVERRIDE;

Now the code doesn’t compile anymore. The error is C2535: “member function already defined or declared”.
I don’t think that should happen.
After quite some time I found the problem. The ShooterProjectile.generated.h already has the declaration in it. But I don’t know why.
I find this quite problematic. I need to know which function I can declare and which ones are autogenerated.

Thanks in advance

The autogenerated functions are part of the generated.h file you include at the top of your class header file. The autogenerated files end up in ProjectName/Intermediate/Build/Win64(or other platform)/ProjectName/Inc/Foo. Usually I do a visual studio search in files with the root set to the intermediate directory.

In this case it generates that function header for you automatically whenever you have a Replicated variable.

Ah ok thanks.
So the autogen tool generates declarations in the case of using a replicated variable.
Is there a definite answer when declarations get autogenerated and when not, Otherwise I will keep on running into this problem. Now that I know it would be easy to solve, but still annoying.

I do not believe there is a full list, but from the autogenerated headers you can at least figure out what’s happening.