]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/58764 ([lwg/2193] error: converting to ‘const std::vector<std::basic_...
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 Jan 2014 19:46:44 +0000 (19:46 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 22 Jan 2014 19:46:44 +0000 (19:46 +0000)
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:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/set.h
libstdc++-v3/include/debug/vector
libstdc++-v3/include/profile/deque
libstdc++-v3/include/profile/list
libstdc++-v3/include/profile/map.h
libstdc++-v3/include/profile/multimap.h
libstdc++-v3/include/profile/multiset.h
libstdc++-v3/include/profile/set.h
libstdc++-v3/include/profile/vector
libstdc++-v3/testsuite/23_containers/deque/58764.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/23_containers/list/58764.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/23_containers/map/58764.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/58764.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/58764.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/58764.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/58764.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc

index 8810a0aa3e86f3e4944d508ab02161d395b87b14..7b8e7b644c47f3f6a8165ef6df081500fc04eb73 100644 (file)
@@ -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.
index 996c10f604a8bb999662a75a8ef6d17e9e5c4361..0f4d0e9b8a79778c9ebe0225d18202e623819354 100644 (file)
@@ -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
index b5e6cc8634dbd0d295f613da4514ded58c9eeb7b..19bb18934e62fb6a0a59cb1c3d2f554a7cf40b32 100644 (file)
@@ -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
index 2cedd39cae8b987c03d0f06cc6ccc8135c76c391..14284aad8add088ec9ac7db62ad58b3f16489a66 100644 (file)
@@ -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
index f16d72ca9e7cf69f7fee08ab02d478a45b637a35..225d06c92d17e0d9e2df1a2b7ca3197c7787788f 100644 (file)
@@ -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
index 145f59d735dbb16a32b4b050d1a59ac0fdbb6361..9918bc5d8088a0580cfb74d919da8a6fbb685f81 100644 (file)
@@ -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
index 2367d57452c7403450d2a9c3624d129322ed02ae..bd68c996d0d2875479976567a653e97fc9440ce2 100644 (file)
@@ -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) { }
 
index 0976573b7e1fdf4a407c1df1d62f7212f40f9a12..fad80cc8ebe175c36295fb31467bc1bfa4c572c8 100644 (file)
@@ -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) { }
 
index 5a39ef8887f2d427a6705c82b16bf799310a23b8..bd555b3c2906eb49a2467163d730ff8fb87c8c22 100644 (file)
@@ -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) { }
 
index 8c84f25298a9f3cee7f692d90c5e6cb1ac34a251..f40ecec818f71f75ace63795e237534e96d51681 100644 (file)
@@ -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) { }
 
index 2b750d792a3af03f5c1c6a1fb0e3d68fec824c93..58d98ef5de51f7cbc12bacb9f50c0a2598db8ffb 100644 (file)
@@ -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
index d6aa6bd594647b6b9043b2bc6db9fe2e06d534f0..2c4f9cbd0199a6a9e2e91502d707811164679eab 100644 (file)
@@ -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
index c89332003a7410da27a68587d0114fae34b4e1d1..87d99a0b93d81d805df52385995aff28496617f4 100644 (file)
@@ -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
index 63fb0cbb227319db6cee9ea749becf2ffe080073..6a3160b8e6beb2304e4bb35eef3a36f87abbf54d 100644 (file)
@@ -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); }
index 4a703ce36365b01ae2b74aada2c2faac274b032e..5ba5355ec55344b037a0f8f93a7c724629ffa49e 100644 (file)
@@ -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) { }
 
index 1719728a26f833cb6af52dabac7dd0c62d24ec8e..8ef6e6b0de72c6eb3b3b19f352b38b4949b93428 100644 (file)
@@ -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) { }
 
index 3b8fd55d444b91fad9bc6c2948d965f7a21c8df1..05fbeb9f6b1d89cd4b7cbd82dad1e2bc9658f73c 100644 (file)
@@ -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) { }
 
index a286ac59b9fbbd604e296d7ed2ce318cb3de6211..5c2c6219029e77a83eddf57418cb01275a3344c1 100644 (file)
@@ -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 (file)
index 0000000..a1056aa
--- /dev/null
@@ -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 = {};
+}
index b4d2c80dbbede8374ecdcf455837432aec7d5261..4de8f2d0fb9d72fa9a23f90b650f1701a9aa57e7 100644 (file)
@@ -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>
 
index bfa6692ade4c6040f65298cbaa42d13b0fa41fb7..41f29056198c712c4b9779e6aa8e726aeca278d7 100644 (file)
@@ -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>
 
index 9a054379c7ccc1b4b407b0f91e576889dd96a778..f77b1267890fcf1280f6f828e47e9a5ee1fad8e3 100644 (file)
@@ -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>
index d2bb0fb2019bf3b3041e9cc22b4c6ccb3efe36e2..e7d5b1ee654b12d08cd614e0152bcd3ccfb41c7a 100644 (file)
@@ -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 (file)
index 0000000..c523e02
--- /dev/null
@@ -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 = {};
+}
index 6dbf14303bf96cb30aedf0e15b744c528b4b6344..fed7829193666aae81c43fe057abdf83ab4d44d5 100644 (file)
@@ -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>
 
index 915ecf435f484998c1e126fc02f08b1fb37689ff..f5eae4fec95c9cfd0689f0ab283ee0119c5c2e2b 100644 (file)
@@ -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>
 
index 5c94805ecea547dbce166123e28841a3d04503fe..e0fbe975377a833c2ecb6636c0ab1d09982cdd2a 100644 (file)
@@ -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>
index 30ea0c478caac6b959fb03d09bccdb1b613d987c..3904624a07e4b9978b3b482a2262987d49e8bef5 100644 (file)
@@ -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 (file)
index 0000000..31e0966
--- /dev/null
@@ -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 (file)
index 0000000..4e85116
--- /dev/null
@@ -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 (file)
index 0000000..f827923
--- /dev/null
@@ -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 (file)
index 0000000..9a2ae3a
--- /dev/null
@@ -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 (file)
index 0000000..6a9823c
--- /dev/null
@@ -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 = {};
+}
index 158a9023476e571fff4b994032861476e3cc322a..cfbe734360106c24c24d4c6ed587956b0c8c3b97 100644 (file)
@@ -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>
 
index cf186ebf9b9294d13e11c542075e689f4dba60cf..88b6e0e2d59270d92ce84aa8e8b47a69e3c647e6 100644 (file)
@@ -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>
 
index cbbc1d3393045d20895798c4ddf7d37c047fd2d0..94cc4ba52115ea892509ab488b75ad46431809e7 100644 (file)
@@ -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>
index 8471a647ffd61d5a6b3857f3b158755a7c11b2bc..de61175bcfede961c88ae556178ebfa83c879947 100644 (file)
@@ -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>