Merge pull request #2220 from DOCGroup/revert-2217-jwi-inetwraning
[ACE_TAO.git] / ACE / tests / Compiler_Features_16_Test.cpp
blobb11ac9992337bd8ecb375bab17bcf7a2f6931635
1 /**
2 * This program checks if the compiler / platform supports strongly
3 * typed enums
4 */
6 #include "test_config.h"
8 #include <limits>
9 #include <stdint.h>
10 #include <ostream>
12 static constexpr uint32_t bound = std::numeric_limits<uint32_t>::max();
14 namespace CORBA {
15 // First forward declare TCKind, this is legal with C++11
16 enum class TCKind : uint32_t;
18 enum class TCKind : uint32_t
20 tk_null,
21 tk_void,
22 tk_event
23 };// TCKind
25 // And another forward declared TCKind, after it has been
26 // declared
27 enum class TCKind : uint32_t;
30 std::ostream& operator<<
31 (std::ostream& strm,CORBA::TCKind _enumerator)
33 switch (_enumerator) {
34 case CORBA::TCKind::tk_null: return strm << "CORBA::TCKind::tk_null"; break;
35 case CORBA::TCKind::tk_void: return strm << "CORBA::TCKind::tk_void"; break;
36 default: return strm;
40 int
41 run_main (int, ACE_TCHAR *[])
43 ACE_START_TEST (ACE_TEXT("Compiler_Features_16_Test"));
45 ACE_DEBUG ((LM_INFO,
46 ACE_TEXT ("Strongly typed enums work.\n")));
48 ACE_END_TEST;
50 return 0;