Can't copy TSharedPtr because of const incompatibility of underlying pointer

I keep getting the same compile error in multiple places when trying to copy TSharedPtr’s around. That error being of the form:

Error	1	error C2440: 'initializing' : cannot convert from 'NonexpirableStatModValue *const ' to 'Stats::NonexpirableStatModValue *'

One example is that I have an array of shared pointers, declared as:

TArray< TSharedPtr<class NonexpirableStatModValue> > m_mods;

And I try to pass an element of that array in to a function like so:

pQuery->AddMod(m_mods[statIndex]);

Where that function signature is of the form:

void	AddMod(const TSharedPtr<NonexpirableStatModValue> pMod)

It seems that most of these instances have to do with having a TArray of shared pointers, and probably due to the fact that the [] operator of TArray returns a reference, which I suppose is automatically const when it’s an rvalue, but I’m not sure I’m supposed to be doing in this instance. Are you just not allowed to have arrays of shared pointers?

Ahh, nevermind, I figured it out. It has to do with the namespace my classes resided in, and how I didn’t specify the namespace for the type in the array declaration.
I.e.
TArray< TSharedPtr > m_mods;
instead of

TArray< TSharedPtr<class Stats::NonexpirableStatModValue> > m_mods;

The difference in const-ness was a red herring.