diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-05 10:32:20 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-05 10:32:20 +0000 |
commit | d5dd69b82c167215fdb5a86ca9a353d54a9c6735 (patch) | |
tree | a48b0c0c79cd6de950dc7c34c54c67329d476c66 /libstdc++-v3 | |
parent | 4d5360f0ec3b7ec4ba9872eb3daadf1c411c49f0 (diff) | |
download | gcc-d5dd69b82c167215fdb5a86ca9a353d54a9c6735.tar.gz |
2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/23_containers/deque/modifiers/insert/const_iterator.cc:
Tweak, avoid potential undefined behavior.
* testsuite/23_containers/list/modifiers/insert/const_iterator.cc:
Likewise.
* testsuite/23_containers/vector/bool/modifiers/insert/
const_iterator.cc: Likewise.
* testsuite/23_containers/vector/modifiers/insert/const_iterator.cc:
Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200703 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
4 files changed, 8 insertions, 8 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/insert/const_iterator.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/insert/const_iterator.cc index 9af2bc90886..42ca1dc10ae 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/modifiers/insert/const_iterator.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/insert/const_iterator.cc @@ -22,11 +22,11 @@ void test01() { - std::deque<int> d1; + std::deque<int> d1, d2{5, 6}; int n = 0; std::deque<int>::iterator it = d1.insert(d1.cbegin(), n); it = d1.insert(d1.cbegin(), 1); it = d1.insert(d1.cbegin(), {2, 3}); it = d1.insert(d1.cbegin(), 1, 4); - it = d1.insert(d1.cbegin(), d1.begin(), d1.end()); + it = d1.insert(d1.cbegin(), d2.begin(), d2.end()); } diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/const_iterator.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/const_iterator.cc index 75670ec7904..3e44720a5d1 100644 --- a/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/const_iterator.cc +++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/const_iterator.cc @@ -22,11 +22,11 @@ void test01() { - std::list<int> l1; + std::list<int> l1, l2{5, 6}; int n = 0; std::list<int>::iterator it = l1.insert(l1.cbegin(), n); it = l1.insert(l1.cbegin(), 1); it = l1.insert(l1.cbegin(), {2, 3}); it = l1.insert(l1.cbegin(), 1, 4); - it = l1.insert(l1.cbegin(), l1.begin(), l1.end()); + it = l1.insert(l1.cbegin(), l2.begin(), l2.end()); } diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/const_iterator.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/const_iterator.cc index 93f3d928711..96cf71cc3e6 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/const_iterator.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/const_iterator.cc @@ -22,9 +22,9 @@ void test01() { - std::vector<bool> vb1; + std::vector<bool> vb1, vb2{true, false}; std::vector<bool>::iterator it = vb1.insert(vb1.cbegin(), true); it = vb1.insert(vb1.cbegin(), {false, true}); it = vb1.insert(vb1.cbegin(), 1, false); - it = vb1.insert(vb1.cbegin(), vb1.begin(), vb1.end()); + it = vb1.insert(vb1.cbegin(), vb2.begin(), vb2.end()); } diff --git a/libstdc++-v3/testsuite/23_containers/vector/modifiers/insert/const_iterator.cc b/libstdc++-v3/testsuite/23_containers/vector/modifiers/insert/const_iterator.cc index b1bf91edc22..21d9a824311 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/modifiers/insert/const_iterator.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/modifiers/insert/const_iterator.cc @@ -22,11 +22,11 @@ void test01() { - std::vector<int> v1; + std::vector<int> v1, v2{5, 6}; int n = 0; std::vector<int>::iterator it = v1.insert(v1.cbegin(), n); it = v1.insert(v1.cbegin(), 1); it = v1.insert(v1.cbegin(), {2, 3}); it = v1.insert(v1.cbegin(), 1, 4); - it = v1.insert(v1.cbegin(), v1.begin(), v1.end()); + it = v1.insert(v1.cbegin(), v2.begin(), v2.end()); } |