File tree Expand file tree Collapse file tree 1 file changed +29
-4
lines changed
Expand file tree Collapse file tree 1 file changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -166,12 +166,37 @@ TEST_CASE("swap", "[swap]")
166166 CHECK (e2 .value () == 1'337 );
167167}
168168
169- TEST_CASE (" brace constructed value " , " [brace_constructed_value ]" )
169+ TEST_CASE (" copy-list-initialization " , " [copy-initialization ]" )
170170{
171- #if !defined(__GNUC__) // GCC bug
172- expected<std::string, int > e {{}};
173- CHECK (e);
171+ {
172+ expected<std::string, int > e = {};
173+ CHECK (e);
174+ }
175+ }
176+
177+ TEST_CASE (" brace constructed value" , " [brace-constructed-value]" )
178+ {
179+ { // non-void
180+ expected<int , int > e {{}};
181+ CHECK (e);
182+ }
183+ { // std::string
184+ #if !defined(__GNUC__)
185+ // This case doesn't work and needs clarification:
186+ // * an implementation bug
187+ // + a GCC bug?
188+ // + a language bug?
189+ // + a MSVC bug?
190+ // see CWG-1228(NAD), CWG-2735(DR), CWG-2856(DR)
191+ // see https://github.com/cplusplus/CWG/issues/486
192+ // see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59389
193+ // see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60027
194+ // see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109247
195+ // see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113300
196+ expected<std::string, int > e {{}};
197+ CHECK (e);
174198#endif
199+ }
175200}
176201
177202TEST_CASE (" LWG-3836" , " [LWG-3836]" )
You can’t perform that action at this time.
0 commit comments