Debian Codegraph @

libstdc++-v3/testsuite/23_containers/forward_list/modifiers/122661.cc

raw
1 // { dg-do compile { target c++11 } }
2
3 // Bug 122661 - Incorrect value category handling in forward_list::assign
4
5 #include <forward_list>
6
7 struct S
8 {
9 S();
10 S& operator=(S const&) & = delete;
11 S& operator=(S const&) &&;
12 };
13
14 void
15 test_pr122661()
16 {
17 std::forward_list<S> fl;
18 S* iter = nullptr;
19 fl.assign(iter, iter);
20 }