diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2013-06-18 07:17:34 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2013-06-18 07:17:34 +0000 |
commit | 7021588b58742df805ea98398ddc1ab51ee6f55a (patch) | |
tree | 18e32a86169f4a95f6a772eae6d0fe4ee41fb2a4 /ACE/tests/Compiler_Features_21_Test.cpp | |
parent | 555a2a6eefafe44da1462b23cd7abedcdbbc3fdb (diff) | |
download | ATCD-7021588b58742df805ea98398ddc1ab51ee6f55a.tar.gz |
Tue Jun 18 07:16:22 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Compiler_Features_21_Test.cpp:
* tests/run_test.lst:
* tests/tests.mpc:
Added new C++11 compiler feature test
Diffstat (limited to 'ACE/tests/Compiler_Features_21_Test.cpp')
-rw-r--r-- | ACE/tests/Compiler_Features_21_Test.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/ACE/tests/Compiler_Features_21_Test.cpp b/ACE/tests/Compiler_Features_21_Test.cpp new file mode 100644 index 00000000000..50c410f3cd0 --- /dev/null +++ b/ACE/tests/Compiler_Features_21_Test.cpp @@ -0,0 +1,57 @@ +// $Id$ + +/** + * This program checks if the compiler doesn't have a certain bug + * that we encountered when testing C++11 features + */ + +#include "test_config.h" + +#if defined (ACE_HAS_CPP11) + +template<class _T1> +struct A +{ + _T1 a; + constexpr A() : a() { } +}; + +struct B +{ + B() : b(new A<int>[0]) {} + A<int> *b; +}; + +int xxx() +{ + B local_array(); + return 0; +} + +int +run_main (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT("Compiler_Features_21_Test")); + + ACE_DEBUG ((LM_INFO, + ACE_TEXT ("Compiler Feature 21 Test does compile and run.\n"))); + + ACE_END_TEST; + + return 0; +} + +#else +int +run_main (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT("Compiler_Features_21_Test")); + + ACE_DEBUG ((LM_INFO, + ACE_TEXT ("No C++11 support enabled\n"))); + + ACE_END_TEST; + return 0; +} + +#endif |