Casting of TMap value

Hi there, not sure if this is a UE4, C++ or logic question… but here goes.

Is it possible to have two or more TMAPs where the values are objects (all derived from the same base class) and pass them into one function?

// THIS IS A BASE CLASS WHICH WILL BE USED AS A TMAP VALUE
class CPPTEST_API UTileUpdateObject : public UObject {

// THIS IS A DERIVED CLASS WHICH HAS A COUPLE OF OTHER VALUES
class MapSculptorUpdateObject : public UTileUpdateObject {

So if my FindNearest function takes (TMap<int32, UTileUpdateObject *> &tiles)

Is there any way I can pass a TMAP<int32, MapSculptorUpdateObject *> to it, as I’m only interested in the keys and base properties?

Sorry for rambling!

Hmm - according to this https://www.unrealengine.com/blog/optimizing-tarray-usage-for-performance point 5 “Keep in mind that TArrays (or any container) with different allocators are in fact a different type, so they cannot be automatically converted to another TArray type. For example you cannot pass MyShapeArray from above to a function taking a plain TArray<Shape*>”

So it looks like not. But I might be able to use a base class that has my Find Nearest function(s) and use template<typename AllocatorType> to deal with it. This is looking like c# generics to me!