add StaticCast to mirror DynamicCast and ConstCast

This commit is contained in:
Mathieu Lacage committed 2009-07-07 13:03:21 +02:00
1 parent 7b134cbafb
commit d90fd1db17
1 file changed
+7
+7
View File
@@ -373,6 +373,13 @@ DynamicCast (Ptr<T2> const&p)
return Ptr<T1> (dynamic_cast<T1 *> (PeekPointer (p)));
}
template <typename T1, typename T2>
Ptr<T1>
StaticCast (Ptr<T2> const&p)
{
return Ptr<T1> (static_cast<T1 *> (PeekPointer (p)));
}
/****************************************************
* Member method implementations.