libstdc++-v3/testsuite/23_containers/deque/modifiers/insert/118035.cc
raw| 1 | // { dg-do run } |
| 2 | |
| 3 | #include <deque> |
| 4 | #include <testsuite_hooks.h> |
| 5 | |
| 6 | struct Sparks |
| 7 | { |
| 8 | Sparks& operator=(const Sparks& s) |
| 9 | { |
| 10 | VERIFY( this != &s ); // This town ain't big enough for the both of us. |
| 11 | return *this; |
| 12 | } |
| 13 | }; |
| 14 | |
| 15 | void |
| 16 | test_pr118035() |
| 17 | { |
| 18 | std::deque<Sparks> d(3, Sparks()); |
| 19 | Sparks s[1]; |
| 20 | d.insert(d.begin() + 1, s, s); |
| 21 | } |
| 22 | |
| 23 | int main() |
| 24 | { |
| 25 | test_pr118035(); |
| 26 | } |