From e59cf7b09e7388d369e8d2bf73501cde79c28708 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 8 Apr 2021 16:43:58 +0200 Subject: Squashed 'EASTL/' content from commit fad5471 git-subtree-dir: EASTL git-subtree-split: fad54717f8e4ebb13b20095da7efd07a53af0f10 --- test/source/TestCppCXTypeTraits.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/source/TestCppCXTypeTraits.cpp (limited to 'test/source/TestCppCXTypeTraits.cpp') diff --git a/test/source/TestCppCXTypeTraits.cpp b/test/source/TestCppCXTypeTraits.cpp new file mode 100644 index 0000000..ab03aa7 --- /dev/null +++ b/test/source/TestCppCXTypeTraits.cpp @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Copyright (c) Electronic Arts Inc. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#include "EASTLTest.h" +#include + +using namespace eastl; + +#if defined(__cplusplus_winrt) + ref class Foo + { + + }; +#endif + +int TestCppCXTypeTraits() +{ + int nErrorCount = 0; + + // We can only build this code if C++/CX is enabled +#if defined(__cplusplus_winrt) + { + Foo^ foo = ref new Foo(); + static_assert(eastl::is_pod::value == false, "Ref types are not POD"); + static_assert(eastl::is_trivially_destructible::value == false, "Ref types cannot be trivially destructible"); + static_assert(eastl::is_trivially_constructible::value == false, "Ref types cannot be trivially constructible"); + static_assert(eastl::is_trivially_copy_constructible::value == false, "Ref types cannot be trivially copyable"); + static_assert(eastl::is_trivially_copy_assignable::value == false, "Ref types cannot be trivially copyable"); + } +#endif + + return nErrorCount; +} -- cgit v1.2.3