DynamicCastSharedPtr is mentioned in the docs (Unreal Smart Pointer Library | Unreal Engine Documentation), but appears nowhere in code. Is this an error and can it be added because i’d like to use it!
It seems that the removal was quite deliberate due to lack of RTTI support:
commit fdbf05dd13e2749f333cc58ca08358d15eff2fe4 Author: Steve Robb <email@example.com> Date: Wed Apr 30 10:53:26 2014 -0400 TSharedPtr build time improvements #ttp 332486: TSharedPtr compile times seem to be exponential ... #remove Deleted DynamicCastShared*, because we don't support RTTI. #fix Replaced the only visible use of DynamicCastShared*, in PropertyEditorModule.cpp, as it seemed unnecessary. #codereview robert.manuszewski,joe.conley [CL 2059954 by Steve Robb in Main branch]
So there’s probably little chance they’ll be coming back.
Not only that method, I could not find any code dealing with dynamic casts for smart pointers… Not that I have never used them. I’m not sure that UE is prepared to deal with RTTI aside from UObject.
What is the specific need you have for it? Maybe there is some way to do a workaround.
Still you are right, it begs the question why is it in the docs to begin with…?