C++ concepts newbie Q's

Hi there!

I have a wiki on template functions here:


Wherever you'd use **dynamic_cast** you can use UE4's Cast<>, which is a dynamic cast, which means it will return nullpointer if the cast failed.



```


AMyActorClass* MyClassPtr = Cast<AMyActorClass>(GetOwner());


```



**static_cast** is dangerous because you can happily static_cast to something that absolutely is not what you are casting it to, which will likely cause a crash if you try to dereference the resulting pointer.



```


AMyActorClass* MyActorPtr = static_cast<AMyActorClass*>(AnyOlePointerWhichMayOrMayNotBeAMyActorClass);


```



**const_cast** lets you remove constness, as was mentioned above.

http://en.cppreference.com/w/cpp/language/const_cast

:)

Rama