Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / ACE / tests / Compiler_Features_21_Test.cpp
blobc8ad796e3a7913bffbb760711566432c85d33779
1 /**
2 * This program checks if the compiler doesn't have a certain bug
3 * that we encountered when testing C++11 features
4 */
6 #include "test_config.h"
8 #if defined (ACE_HAS_CPP11)
10 template<class _T1>
11 struct A
13 _T1 a;
14 constexpr A() : a() { }
17 struct B
19 B() : b(new A<int>[0]) {}
20 ~B() { delete [] b; }
21 A<int> *b;
24 int xxx()
26 B local_array;
27 return 0;
30 int
31 run_main (int, ACE_TCHAR *[])
33 ACE_START_TEST (ACE_TEXT("Compiler_Features_21_Test"));
35 ACE_DEBUG ((LM_INFO,
36 ACE_TEXT ("Compiler Feature 21 Test does compile and run.\n")));
38 int retval = xxx();
40 ACE_END_TEST;
42 return retval;
45 #else
46 int
47 run_main (int, ACE_TCHAR *[])
49 ACE_START_TEST (ACE_TEXT("Compiler_Features_21_Test"));
51 ACE_DEBUG ((LM_INFO,
52 ACE_TEXT ("No C++11 support enabled\n")));
54 ACE_END_TEST;
55 return 0;
58 #endif