2 * This program checks if the compiler doesn't have a certain bug
3 * that we encountered when testing C++11 features
6 #include "test_config.h"
17 /// Using this to iterate over the OPERATIONS enum
18 OPERATIONS
operator++(OPERATIONS
& x
) { return x
= static_cast<OPERATIONS
>(static_cast<uint16_t>(x
) + 1); }
19 OPERATIONS
operator*(OPERATIONS c
) {return c
;}
20 OPERATIONS
begin(OPERATIONS
) {return OPERATIONS::ADD_OBJECT_POLICY
;}
21 OPERATIONS
end(OPERATIONS
) {return OPERATIONS::LAST_OPERATION
;}
24 run_main (int, ACE_TCHAR
*[])
26 ACE_START_TEST (ACE_TEXT("Compiler_Features_28_Test"));
29 for (OPERATIONS op
: OPERATIONS ())
31 if (op
== OPERATIONS::ADD_OBJECT_POLICY
&& count
!= 0)
32 ACE_ERROR ((LM_ERROR
, "Wrong order when using range based for loop\n"));
33 if (op
== OPERATIONS::ADD_CURRENT_POLICY
&& count
!= 1)
34 ACE_ERROR ((LM_ERROR
, "Wrong order when using range based for loop\n"));
35 if (op
== OPERATIONS::LAST_OPERATION
&& count
!= 2)
36 ACE_ERROR ((LM_ERROR
, "Wrong order when using range based for loop\n"));