Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / tests / Compiler_Features_38_Test.cpp
blob402fdd4816e9d04eac35c8e12be4ebd201b9383b
1 /**
2 * This program checks if the compiler doesn't have a certain bug
3 * that we encountered when testing with TAO
4 */
6 #include "test_config.h"
7 #include "ace/CDR_Base.h"
9 template <typename T>
10 class Foo_T
12 public:
13 Foo_T () : member() {};
14 using T_elem = T &;
15 T_elem operator[] (ACE_CDR::ULong) { return member; }
16 private:
17 T member;
20 struct Foo2
22 long i;
24 using Foo2Seq = Foo_T<Foo2>;
26 int
27 run_main (int, ACE_TCHAR *[])
29 ACE_START_TEST (ACE_TEXT("Compiler_Features_38_Test"));
31 Foo2Seq f2;
32 long const j = f2[0].i;
33 ACE_UNUSED_ARG(j);
35 ACE_DEBUG ((LM_INFO,
36 ACE_TEXT ("C++ support ok\n")));
38 ACE_END_TEST;
40 return 0;