File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /* *
2+ * This program reproduces an compiler issue with Visual Studio 2022
3+ */
4+
5+ #include " test_config.h"
6+ #include < array>
7+ #include < string>
8+
9+ namespace Test
10+ {
11+ using arrayofstring = std::array<std::string, 5 >;
12+
13+ class unionarrayofstring
14+ {
15+ public:
16+ unionarrayofstring () = default ;
17+ unionarrayofstring (const unionarrayofstring&) = delete ;
18+ unionarrayofstring (unionarrayofstring&&) = delete ;
19+ inline ~unionarrayofstring () {}
20+ unionarrayofstring& operator = (const unionarrayofstring&) = delete ;
21+ unionarrayofstring& operator = (unionarrayofstring&&) = delete ;
22+
23+ private:
24+ union u_type_
25+ {
26+ u_type_ () = default ;
27+ ~u_type_ () {}
28+ ::Test::arrayofstring as_{};
29+ } u_{};
30+ };
31+ }
32+
33+ int run_main (int , ACE_TCHAR *[])
34+ {
35+ ACE_START_TEST (ACE_TEXT (" Compiler_Features_42_Test" ));
36+
37+ ::Test::unionarrayofstring p;
38+
39+ ACE_END_TEST ;
40+
41+ return 0 ;
42+ }
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ Compiler_Features_38_Test
112112Compiler_Features_39_Test
113113Compiler_Features_40_Test
114114Compiler_Features_41_Test
115+ Compiler_Features_42_Test
115116Config_Test: !LynxOS !VxWorks !ACE_FOR_TAO
116117Conn_Test: !ACE_FOR_TAO
117118DLL_Test: !STATIC
Original file line number Diff line number Diff line change @@ -863,6 +863,17 @@ project(Compiler_Features_41_Test) : acetest {
863863 }
864864}
865865
866+ project(Compiler_Features_42_Test) : acetest {
867+ exename = Compiler_Features_42_Test
868+ Source_Files {
869+ Compiler_Features_42_Test.cpp
870+ }
871+ // Visual Studio 2019/2022 give an internal compiler error when using C++17 (the default for ACE)
872+ specific(vs2019,vs2022) {
873+ LanguageStandard = stdcpp20
874+ }
875+ }
876+
866877project(Config Test) : acetest {
867878 avoids += ace_for_tao
868879 exename = Config_Test
Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ namespace TAO
3636 *
3737 * A @c Case_T contains the corresponding case label value, name and
3838 * pointer to the @c CORBA::TypeCode for a given OMG IDL @c union
39- * @c case. For
40- * example, the cases in following OMG IDL @c union:
39+ * @c case. For example, the cases in following OMG IDL @c union:
4140 *
4241 * \code
4342 * union Foo switch (short)
You can’t perform that action at this time.
0 commit comments