Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / tests / Compiler_Features_21_Test.cpp
blob2dbd9d05a769d3c0748b97e9e7e940cfdbd79b9e
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 template<class _T1>
9 struct A
11 _T1 a;
12 constexpr A() : a() { }
15 struct B
17 B() : b(new A<int>[0]) {}
18 ~B() { delete [] b; }
19 A<int> *b;
22 int xxx()
24 B local_array;
25 return 0;
28 int
29 run_main (int, ACE_TCHAR *[])
31 ACE_START_TEST (ACE_TEXT("Compiler_Features_21_Test"));
33 ACE_DEBUG ((LM_INFO,
34 ACE_TEXT ("Compiler Feature 21 Test does compile and run.\n")));
36 int retval = xxx();
38 ACE_END_TEST;
40 return retval;