diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2014-01-22 19:46:44 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2014-01-22 19:46:44 +0000 |
commit | c3cdd71f455baea8b0c36968239871ab92292577 (patch) | |
tree | e6daca75487c56849b09325310551bbdf4bb92ea | |
parent | df2980beb3ddfd359fa00b04f97c904344988b30 (diff) | |
download | gcc-c3cdd71f455baea8b0c36968239871ab92292577.zip gcc-c3cdd71f455baea8b0c36968239871ab92292577.tar.gz gcc-c3cdd71f455baea8b0c36968239871ab92292577.tar.bz2 |
re PR libstdc++/58764 ([lwg/2193] error: converting to ‘const std::vector<std::basic_string<char> >’ from initializer list would use explicit constructor)
PR libstdc++/58764
* include/bits/stl_deque.h (deque::deque(const allocator_type&):
Split into separate default constructor and constructor taking
allocator.
* include/bits/stl_list.h (list::list(const allocator_type&): Likewise.
* include/bits/stl_vector.h (vector::vector(const allocator_type&):
Likewise.
* include/debug/deque (deque::deque(const allocator_type&)): Likewise.
* include/debug/list (list::list(const _Allocator&)): Likewise.
* include/debug/map.h (map::map(const _Compare&, const _Allocator&)):
Likewise.
* include/debug/multimap.h
(multimap::multimap(const _Compare&, const _Allocator&)): Likewise.
* include/debug/set.h (set::set(const _Compare&, const _Allocator&)):
Likewise.
* include/debug/multiset.h
(multiset::multiset(const _Compare&, const _Allocator&)): Likewise.
* include/debug/vector (vector::vector(const allocator_type&)):
Likewise.
* include/profile/deque (deque::deque(const _Allocator&)): Likewise.
* include/profile/list (list::list(const _Allocator&)): Likewise.
* include/profile/map.h
(map::map(const _Compare&, const _Allocator&)): Likewise.
* include/profile/multimap.h
(multimap::multimap(const _Compare&, const _Allocator&)): Likewise.
* include/profile/set.h
(set::set(const _Compare&, const _Allocator&)): Likewise.
* include/profile/multiset.h
(multiset::multiset(const _Compare&, const _Allocator&)): Likewise.
* include/profile/vector (vector::vector(const _Allocator&)):
Likewise.
* testsuite/23_containers/deque/58764.cc: New.
* testsuite/23_containers/list/58764.cc: New.
* testsuite/23_containers/map/58764.cc: New.
* testsuite/23_containers/multimap/58764.cc: New.
* testsuite/23_containers/set/58764.cc: New.
* testsuite/23_containers/multiset/58764.cc: New.
* testsuite/23_containers/vector/58764.cc: New.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
Adjust dg-error line number.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.
From-SVN: r206939
37 files changed, 368 insertions, 29 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8810a0a..7b8e7b6 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -2,6 +2,69 @@ * include/bits/stl_deque.h (_Deque_impl): Move comment. + PR libstdc++/58764 + * include/bits/stl_deque.h (deque::deque(const allocator_type&): + Split into separate default constructor and constructor taking + allocator. + * include/bits/stl_list.h (list::list(const allocator_type&): Likewise. + * include/bits/stl_vector.h (vector::vector(const allocator_type&): + Likewise. + * include/debug/deque (deque::deque(const allocator_type&)): Likewise. + * include/debug/list (list::list(const _Allocator&)): Likewise. + * include/debug/map.h (map::map(const _Compare&, const _Allocator&)): + Likewise. + * include/debug/multimap.h + (multimap::multimap(const _Compare&, const _Allocator&)): Likewise. + * include/debug/set.h (set::set(const _Compare&, const _Allocator&)): + Likewise. + * include/debug/multiset.h + (multiset::multiset(const _Compare&, const _Allocator&)): Likewise. + * include/debug/vector (vector::vector(const allocator_type&)): + Likewise. + * include/profile/deque (deque::deque(const _Allocator&)): Likewise. + * include/profile/list (list::list(const _Allocator&)): Likewise. + * include/profile/map.h + (map::map(const _Compare&, const _Allocator&)): Likewise. + * include/profile/multimap.h + (multimap::multimap(const _Compare&, const _Allocator&)): Likewise. + * include/profile/set.h + (set::set(const _Compare&, const _Allocator&)): Likewise. + * include/profile/multiset.h + (multiset::multiset(const _Compare&, const _Allocator&)): Likewise. + * include/profile/vector (vector::vector(const _Allocator&)): + Likewise. + * testsuite/23_containers/deque/58764.cc: New. + * testsuite/23_containers/list/58764.cc: New. + * testsuite/23_containers/map/58764.cc: New. + * testsuite/23_containers/multimap/58764.cc: New. + * testsuite/23_containers/set/58764.cc: New. + * testsuite/23_containers/multiset/58764.cc: New. + * testsuite/23_containers/vector/58764.cc: New. + * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: + Adjust dg-error line number. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: + Likewise. + * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: + Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: + Likewise. + 2014-01-21 Tim Shen <timshen91@gmail.com> * include/bits/regex.tcc: Remove incorrect `nosubs` handling. diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index 996c10f..0f4d0e9 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -781,12 +781,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER public: // [23.2.1.1] construct/copy/destroy // (assign() and get_allocator() are also listed in this section) + + /** + * @brief Creates a %deque with no elements. + */ + deque() : _Base() { } + /** * @brief Creates a %deque with no elements. * @param __a An allocator object. */ explicit - deque(const allocator_type& __a = allocator_type()) + deque(const allocator_type& __a) : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index b5e6cc8..19bb189 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -526,12 +526,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER public: // [23.2.2.1] construct/copy/destroy // (assign() and get_allocator() are also listed in this section) + + /** + * @brief Creates a %list with no elements. + */ + list() _GLIBCXX_NOEXCEPT + : _Base() { } + /** * @brief Creates a %list with no elements. * @param __a An allocator object. */ explicit - list(const allocator_type& __a = allocator_type()) _GLIBCXX_NOEXCEPT + list(const allocator_type& __a) _GLIBCXX_NOEXCEPT : _Base(_Node_alloc_type(__a)) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 2cedd39..14284aa 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -242,12 +242,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER public: // [23.2.4.1] construct/copy/destroy // (assign() and get_allocator() are also listed in this section) + + /** + * @brief Creates a %vector with no elements. + */ + vector() _GLIBCXX_NOEXCEPT : _Base() { } + /** * @brief Creates a %vector with no elements. * @param __a An allocator object. */ explicit - vector(const allocator_type& __a = allocator_type()) _GLIBCXX_NOEXCEPT + vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index f16d72c..225d06c 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -68,8 +68,11 @@ namespace __debug typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // 23.2.1.1 construct/copy/destroy: + + deque() : _Base() { } + explicit - deque(const _Allocator& __a = _Allocator()) + deque(const _Allocator& __a) : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list index 145f59d..9918bc5 100644 --- a/libstdc++-v3/include/debug/list +++ b/libstdc++-v3/include/debug/list @@ -69,8 +69,12 @@ namespace __debug typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // 23.2.2.1 construct/copy/destroy: + + list() _GLIBCXX_NOEXCEPT + : _Base() { } + explicit - list(const _Allocator& __a = _Allocator()) _GLIBCXX_NOEXCEPT + list(const _Allocator& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h index 2367d57..bd68c99 100644 --- a/libstdc++-v3/include/debug/map.h +++ b/libstdc++-v3/include/debug/map.h @@ -77,7 +77,10 @@ namespace __debug typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // 23.3.1.1 construct/copy/destroy: - explicit map(const _Compare& __comp = _Compare(), + + map() : _Base() { } + + explicit map(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h index 0976573..fad80cc 100644 --- a/libstdc++-v3/include/debug/multimap.h +++ b/libstdc++-v3/include/debug/multimap.h @@ -78,7 +78,10 @@ namespace __debug typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // 23.3.1.1 construct/copy/destroy: - explicit multimap(const _Compare& __comp = _Compare(), + + multimap() : _Base() { } + + explicit multimap(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h index 5a39ef8..bd555b3 100644 --- a/libstdc++-v3/include/debug/multiset.h +++ b/libstdc++-v3/include/debug/multiset.h @@ -77,7 +77,10 @@ namespace __debug typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // 23.3.3.1 construct/copy/destroy: - explicit multiset(const _Compare& __comp = _Compare(), + + multiset() : _Base() { } + + explicit multiset(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h index 8c84f25..f40ecec 100644 --- a/libstdc++-v3/include/debug/set.h +++ b/libstdc++-v3/include/debug/set.h @@ -76,7 +76,10 @@ namespace __debug typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // 23.3.3.1 construct/copy/destroy: - explicit set(const _Compare& __comp = _Compare(), + + set() : _Base() { } + + explicit set(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector index 2b750d7..58d98ef 100644 --- a/libstdc++-v3/include/debug/vector +++ b/libstdc++-v3/include/debug/vector @@ -76,8 +76,12 @@ namespace __debug typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // 23.2.4.1 construct/copy/destroy: + + vector() _GLIBCXX_NOEXCEPT + : _Base(), _M_guaranteed_capacity(0) { } + explicit - vector(const _Allocator& __a = _Allocator()) _GLIBCXX_NOEXCEPT + vector(const _Allocator& __a) _GLIBCXX_NOEXCEPT : _Base(__a), _M_guaranteed_capacity(0) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/profile/deque b/libstdc++-v3/include/profile/deque index d6aa6bd..2c4f9cb 100644 --- a/libstdc++-v3/include/profile/deque +++ b/libstdc++-v3/include/profile/deque @@ -60,8 +60,12 @@ namespace __profile typedef typename _Base::const_pointer const_pointer; // 23.2.1.1 construct/copy/destroy: + + deque() + : _Base() { } + explicit - deque(const _Allocator& __a = _Allocator()) + deque(const _Allocator& __a) : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/profile/list b/libstdc++-v3/include/profile/list index c893320..87d99a0 100644 --- a/libstdc++-v3/include/profile/list +++ b/libstdc++-v3/include/profile/list @@ -64,8 +64,16 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> > typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // 23.2.2.1 construct/copy/destroy: + + list() _GLIBCXX_NOEXCEPT + : _Base() + { + __profcxx_list_construct(this); // list2slist + __profcxx_list_construct2(this); // list2vector + } + explicit - list(const _Allocator& __a = _Allocator()) _GLIBCXX_NOEXCEPT + list(const _Allocator& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { __profcxx_list_construct(this); // list2slist diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h index 63fb0cb..6a3160b 100644 --- a/libstdc++-v3/include/profile/map.h +++ b/libstdc++-v3/include/profile/map.h @@ -67,8 +67,13 @@ namespace __profile typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // 23.3.1.1 construct/copy/destroy: + + map() + : _Base() + { __profcxx_map_to_unordered_map_construct(this); } + explicit - map(const _Compare& __comp = _Compare(), + map(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { __profcxx_map_to_unordered_map_construct(this); } diff --git a/libstdc++-v3/include/profile/multimap.h b/libstdc++-v3/include/profile/multimap.h index 4a703ce3..5ba5355 100644 --- a/libstdc++-v3/include/profile/multimap.h +++ b/libstdc++-v3/include/profile/multimap.h @@ -68,7 +68,11 @@ namespace __profile typedef typename _Base::const_pointer const_pointer; // 23.3.1.1 construct/copy/destroy: - explicit multimap(const _Compare& __comp = _Compare(), + + multimap() + : _Base() { } + + explicit multimap(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/profile/multiset.h b/libstdc++-v3/include/profile/multiset.h index 1719728..8ef6e6b 100644 --- a/libstdc++-v3/include/profile/multiset.h +++ b/libstdc++-v3/include/profile/multiset.h @@ -68,7 +68,11 @@ namespace __profile typedef typename _Base::const_pointer const_pointer; // 23.3.3.1 construct/copy/destroy: - explicit multiset(const _Compare& __comp = _Compare(), + + multiset() + : _Base() { } + + explicit multiset(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/profile/set.h b/libstdc++-v3/include/profile/set.h index 3b8fd55..05fbeb9 100644 --- a/libstdc++-v3/include/profile/set.h +++ b/libstdc++-v3/include/profile/set.h @@ -68,7 +68,11 @@ namespace __profile typedef typename _Base::const_pointer const_pointer; // 23.3.3.1 construct/copy/destroy: - explicit set(const _Compare& __comp = _Compare(), + + set() + : _Base() { } + + explicit set(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector index a286ac5..5c2c621 100644 --- a/libstdc++-v3/include/profile/vector +++ b/libstdc++-v3/include/profile/vector @@ -77,8 +77,16 @@ namespace __profile _M_base() const _GLIBCXX_NOEXCEPT { return *this; } // 23.2.4.1 construct/copy/destroy: + + vector() _GLIBCXX_NOEXCEPT + : _Base() + { + __profcxx_vector_construct(this, this->capacity()); + __profcxx_vector_construct2(this); + } + explicit - vector(const _Allocator& __a = _Allocator()) _GLIBCXX_NOEXCEPT + vector(const _Allocator& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { __profcxx_vector_construct(this, this->capacity()); diff --git a/libstdc++-v3/testsuite/23_containers/deque/58764.cc b/libstdc++-v3/testsuite/23_containers/deque/58764.cc new file mode 100644 index 0000000..a1056aa --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/deque/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include <deque> + +void test01() +{ + std::deque<int> a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc index b4d2c80..4de8f2d 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1758 } +// { dg-error "no matching" "" { target *-*-* } 1764 } #include <deque> diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc index bfa6692..41f2905 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1691 } +// { dg-error "no matching" "" { target *-*-* } 1697 } #include <deque> diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc index 9a05437..f77b126 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1691 } +// { dg-error "no matching" "" { target *-*-* } 1697 } #include <deque> #include <utility> diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc index d2bb0fb..e7d5b1e 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1842 } +// { dg-error "no matching" "" { target *-*-* } 1848 } #include <deque> diff --git a/libstdc++-v3/testsuite/23_containers/list/58764.cc b/libstdc++-v3/testsuite/23_containers/list/58764.cc new file mode 100644 index 0000000..c523e02 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/list/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include <list> + +void test01() +{ + std::list<int> a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc index 6dbf143..fed7829 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1646 } +// { dg-error "no matching" "" { target *-*-* } 1653 } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc index 915ecf4..f5eae4f 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1598 } +// { dg-error "no matching" "" { target *-*-* } 1605 } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc index 5c94805..e0fbe97 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1598 } +// { dg-error "no matching" "" { target *-*-* } 1605 } #include <list> #include <utility> diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc index 30ea0c4..3904624 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1598 } +// { dg-error "no matching" "" { target *-*-* } 1605 } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/map/58764.cc b/libstdc++-v3/testsuite/23_containers/map/58764.cc new file mode 100644 index 0000000..31e0966 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/map/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include <map> + +void test01() +{ + std::map<int, int> a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/multimap/58764.cc b/libstdc++-v3/testsuite/23_containers/multimap/58764.cc new file mode 100644 index 0000000..4e85116 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multimap/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include <map> + +void test01() +{ + std::multimap<int, int> a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/multiset/58764.cc b/libstdc++-v3/testsuite/23_containers/multiset/58764.cc new file mode 100644 index 0000000..f827923 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multiset/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include <set> + +void test01() +{ + std::multiset<int> a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/set/58764.cc b/libstdc++-v3/testsuite/23_containers/set/58764.cc new file mode 100644 index 0000000..9a2ae3a --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/set/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include <set> + +void test01() +{ + std::set<int> a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/vector/58764.cc b/libstdc++-v3/testsuite/23_containers/vector/58764.cc new file mode 100644 index 0000000..6a9823c --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/vector/58764.cc @@ -0,0 +1,29 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include <vector> + +void test01() +{ + std::vector<int> a = {}; + std::vector<bool> b = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc index 158a902..cfbe734 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1306 } +// { dg-error "no matching" "" { target *-*-* } 1312 } #include <vector> diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc index cf186eb..88b6e0e 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1232 } +// { dg-error "no matching" "" { target *-*-* } 1238 } #include <vector> diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc index cbbc1d3..94cc4ba 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1232 } +// { dg-error "no matching" "" { target *-*-* } 1238 } #include <vector> #include <utility> diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc index 8471a64..de61175 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1347 } +// { dg-error "no matching" "" { target *-*-* } 1353 } #include <vector> |