Minimal TypeInfo header/reduce std interdependencies. (#2688)
* Minimal TypeInfo header/reduce std interdependencies. TypeInfoSimple.h is a small header that can replace the use of TypeInfo.h in some cases. Signed-off-by: Nemerle <nemerle5+git@gmail.com> * Windows build fixed Removed algorithm.h from string_view.h smoke-test passed Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Resotore dynamic_pointer_cast in intrusive_ptr Requested by reviewer. Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Fix CI build string.h - missed alogorithm.h, since it was removed from string_view NodeWrapper.h - missing smart_ptr.h Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> Co-authored-by: Nemerle <nemerle5+git@gmail.com>
This commit is contained in:
@@ -2051,10 +2051,11 @@ namespace UnitTest
|
||||
|
||||
TEST_F(SmartPtr, IntrusivePtr_DynamicCast)
|
||||
{
|
||||
|
||||
AZStd::intrusive_ptr<RefCountedClass> basePointer = new RefCountedSubclass;
|
||||
|
||||
AZStd::intrusive_ptr<RefCountedSubclass> correctCast = dynamic_pointer_cast<RefCountedSubclass>(basePointer);
|
||||
AZStd::intrusive_ptr<RefCountedSubclassB> wrongCast = dynamic_pointer_cast<RefCountedSubclassB>(basePointer);
|
||||
AZStd::intrusive_ptr<RefCountedSubclass> correctCast = azdynamic_cast<RefCountedSubclass *>(basePointer);
|
||||
AZStd::intrusive_ptr<RefCountedSubclassB> wrongCast = azdynamic_cast<RefCountedSubclassB *>(basePointer);
|
||||
|
||||
EXPECT_TRUE(correctCast.get() == basePointer.get());
|
||||
EXPECT_TRUE(wrongCast.get() == nullptr);
|
||||
|
||||
Reference in New Issue
Block a user