@@ -111,7 +111,7 @@ TEST_CASE("begin", "[intrusive_forward_list]") {
111
111
CHECK (std::cbegin (list)->value == 1 );
112
112
}
113
113
114
- TEST_CASE (" front and back" , " [intrusive_list ]" ) {
114
+ TEST_CASE (" front and back" , " [intrusive_forward_list ]" ) {
115
115
stdx::intrusive_forward_list<int_node> list{};
116
116
int_node n1{1 };
117
117
int_node n2{2 };
@@ -226,7 +226,8 @@ TEST_CASE("checked operation clears pointers on pop",
226
226
CHECK (n1.next == nullptr );
227
227
}
228
228
229
- TEST_CASE (" checked operation clears pointers on clear" , " [intrusive_list]" ) {
229
+ TEST_CASE (" checked operation clears pointers on clear" ,
230
+ " [intrusive_forward_list]" ) {
230
231
stdx::intrusive_forward_list<int_node> list{};
231
232
int_node n1{1 };
232
233
int_node n2{2 };
@@ -265,7 +266,8 @@ struct injected_handler {
265
266
template <> inline auto stdx::panic_handler<> = injected_handler{};
266
267
267
268
#if __cplusplus >= 202002L
268
- TEST_CASE (" checked panic when pushing populated node" , " [intrusive_list]" ) {
269
+ TEST_CASE (" checked panic when pushing populated node" ,
270
+ " [intrusive_forward_list]" ) {
269
271
stdx::intrusive_forward_list<int_node> list{};
270
272
int_node n{5 };
271
273
@@ -281,7 +283,8 @@ TEST_CASE("checked panic when pushing populated node", "[intrusive_list]") {
281
283
CHECK (compile_time_calls == 1 );
282
284
}
283
285
#else
284
- TEST_CASE (" checked panic when pushing populated node" , " [intrusive_list]" ) {
286
+ TEST_CASE (" checked panic when pushing populated node" ,
287
+ " [intrusive_forward_list]" ) {
285
288
stdx::intrusive_forward_list<int_node> list{};
286
289
int_node n{5 };
287
290
@@ -298,7 +301,8 @@ TEST_CASE("checked panic when pushing populated node", "[intrusive_list]") {
298
301
}
299
302
#endif
300
303
301
- TEST_CASE (" unchecked operation doesn't clear pointers" , " [intrusive_list]" ) {
304
+ TEST_CASE (" unchecked operation doesn't clear pointers" ,
305
+ " [intrusive_forward_list]" ) {
302
306
stdx::intrusive_forward_list<int_node, stdx::node_policy::unchecked> list{};
303
307
int_node n1{1 };
304
308
int_node n2{2 };
@@ -309,3 +313,18 @@ TEST_CASE("unchecked operation doesn't clear pointers", "[intrusive_list]") {
309
313
CHECK (list.pop_front () == &n1);
310
314
CHECK (n1.next == before);
311
315
}
316
+
317
+ TEST_CASE (" intrusive_forward_list can be instantiated with incomplete types" ,
318
+ " [intrusive_forward_list]" ) {
319
+ struct incomplete_int_node ;
320
+ stdx::intrusive_forward_list<incomplete_int_node> list{};
321
+
322
+ struct incomplete_int_node {
323
+ int value{};
324
+ incomplete_int_node *next{};
325
+ };
326
+
327
+ incomplete_int_node n1{1 };
328
+ list.push_back (&n1);
329
+ CHECK (list.pop_front () == &n1);
330
+ }
0 commit comments