]> gcc.gnu.org Git - gcc.git/commitdiff
[multiple changes]
authorPaolo Carlini <pcarlini@suse.de>
Mon, 6 Jun 2005 16:59:55 +0000 (16:59 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 6 Jun 2005 16:59:55 +0000 (16:59 +0000)
2005-06-06  Paolo Carlini  <pcarlini@suse.de>

        Port from libstdcxx_so_7-branch:
2004-09-24  Paolo Carlini  <pcarlini@suse.de>
    Jonathan Wakely  <redi@gcc.gnu.org>

* include/bits/stl_list.h (list::list(size_type, value_type,
const allocator_type&): Implement according to the letter of the
standard, i.e., don't use two overloads, not equivalent in case
of non default constructible T.
(list::resize(size_type, const value_type&)): Fix the signature:
according to the standard the second argument is by value; also,
don't use two overloads.
* include/bits/list.tcc (list::resize(size_type, const value_type&)):
Adjust consistently the signature.
* include/bits/stl_deque.h (deque::deque(size_type, value_type,
const allocator_type&)): Likewise.
(deque::resize(size_type, const value_type&)): Likewise.
* include/bits/stl_vector.h (vector::vector(size_type, value_type,
const allocator_type&)): Likewise.
(vector::resize(size_type, const value_type&)): Likewise.
* testsuite/testsuite_hooks.h: Add NonDefaultConstructible test type.
* testsuite/23_containers/deque/explicit_instantiation/2.cc: New.
* testsuite/23_containers/list/explicit_instantiation/2.cc: New.
* testsuite/23_containers/map/explicit_instantiation/2.cc: New.
* testsuite/23_containers/multimap/explicit_instantiation/2.cc: New.
* testsuite/23_containers/multiset/explicit_instantiation/2.cc: New.
* testsuite/23_containers/set/explicit_instantiation/2.cc: New.
* testsuite/23_containers/vector/explicit_instantiation/2.cc: New.

* include/bits/deque.tcc: Minor formatting fix.

From-SVN: r100668

14 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/deque.tcc
libstdc++-v3/include/bits/list.tcc
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/testsuite/23_containers/deque/explicit_instantiation/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/list/explicit_instantiation/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/map/explicit_instantiation/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/explicit_instantiation/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/explicit_instantiation/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/explicit_instantiation/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/vector/explicit_instantiation/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/testsuite_hooks.h

index 442fb3f6b6c8091885dbae7104da58334012f529..3a91b0019e0dfbd56944e8d966c5a268be417f49 100644 (file)
@@ -1,3 +1,35 @@
+2005-06-06  Paolo Carlini  <pcarlini@suse.de>
+
+        Port from libstdcxx_so_7-branch:
+       2004-09-24  Paolo Carlini  <pcarlini@suse.de>
+                   Jonathan Wakely  <redi@gcc.gnu.org>
+
+       * include/bits/stl_list.h (list::list(size_type, value_type,
+       const allocator_type&): Implement according to the letter of the
+       standard, i.e., don't use two overloads, not equivalent in case
+       of non default constructible T.
+       (list::resize(size_type, const value_type&)): Fix the signature:
+       according to the standard the second argument is by value; also,
+       don't use two overloads.
+       * include/bits/list.tcc (list::resize(size_type, const value_type&)):
+       Adjust consistently the signature.
+       * include/bits/stl_deque.h (deque::deque(size_type, value_type,
+       const allocator_type&)): Likewise.
+       (deque::resize(size_type, const value_type&)): Likewise.
+       * include/bits/stl_vector.h (vector::vector(size_type, value_type,
+       const allocator_type&)): Likewise.
+       (vector::resize(size_type, const value_type&)): Likewise.
+       * testsuite/testsuite_hooks.h: Add NonDefaultConstructible test type.
+       * testsuite/23_containers/deque/explicit_instantiation/2.cc: New.
+       * testsuite/23_containers/list/explicit_instantiation/2.cc: New.
+       * testsuite/23_containers/map/explicit_instantiation/2.cc: New.
+       * testsuite/23_containers/multimap/explicit_instantiation/2.cc: New.
+       * testsuite/23_containers/multiset/explicit_instantiation/2.cc: New.
+       * testsuite/23_containers/set/explicit_instantiation/2.cc: New.
+       * testsuite/23_containers/vector/explicit_instantiation/2.cc: New.
+
+       * include/bits/deque.tcc: Minor formatting fix.
+
 2005-06-06  Peter Doerfler  <doerfler@techinfo.rwth-aachen.de>
 
        * include/bits/stl_function.h: ... and another one.
index 35ceb69b402f43a9df508518bd20839624d59c49..e69c79a4f34aea4021439d87b1617ecd69ae645c 100644 (file)
@@ -201,9 +201,9 @@ namespace _GLIBCXX_STD
   template <typename _Tp, class _Alloc>
     template <typename _InputIterator>
       void
-      deque<_Tp, _Alloc>
-      ::_M_assign_aux(_InputIterator __first, _InputIterator __last,
-                     std::input_iterator_tag)
+      deque<_Tp, _Alloc>::
+      _M_assign_aux(_InputIterator __first, _InputIterator __last,
+                   std::input_iterator_tag)
       {
         iterator __cur = begin();
         for (; __first != __last && __cur != end(); ++__cur, ++__first)
index 14ea0f0dbfac778616c41e43e29e1e53b2b8fd4c..d65f73c0beec6e5522f7c03d575f30b7ed078db6 100644 (file)
@@ -1,6 +1,6 @@
 // List implementation (out of line) -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005 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
@@ -102,7 +102,7 @@ namespace _GLIBCXX_STD
   template<typename _Tp, typename _Alloc>
     void
     list<_Tp, _Alloc>::
-    resize(size_type __new_size, const value_type& __x)
+    resize(size_type __new_size, value_type __x)
     {
       iterator __i = begin();
       size_type __len = 0;
index 249c4f2e7ee88b43e4ee6c87b0b664e3bb4b2cc3..5a20b657a5fb3c50f447490dfe44df574d24a4db 100644 (file)
@@ -669,23 +669,12 @@ namespace _GLIBCXX_STD
        *
        *  This constructor fills the %deque with @a n copies of @a value.
        */
-      deque(size_type __n, const value_type& __value,
+      explicit
+      deque(size_type __n, const value_type& __value = value_type(),
            const allocator_type& __a = allocator_type())
       : _Base(__a, __n)
       { _M_fill_initialize(__value); }
 
-      /**
-       *  @brief  Create a %deque with default elements.
-       *  @param  n  The number of elements to initially create.
-       *
-       *  This constructor fills the %deque with @a n copies of a
-       *  default-constructed element.
-       */
-      explicit
-      deque(size_type __n)
-      : _Base(allocator_type(), __n)
-      { _M_fill_initialize(value_type()); }
-
       /**
        *  @brief  %Deque copy constructor.
        *  @param  x  A %deque of identical element and allocator types.
@@ -874,7 +863,7 @@ namespace _GLIBCXX_STD
        *  data.
        */
       void
-      resize(size_type __new_size, const value_type& __x)
+      resize(size_type __new_size, value_type __x = value_type())
       {
        const size_type __len = size();
        if (__new_size < __len)
@@ -883,19 +872,6 @@ namespace _GLIBCXX_STD
          insert(this->_M_impl._M_finish, __new_size - __len, __x);
       }
 
-      /**
-       *  @brief  Resizes the %deque to the specified number of elements.
-       *  @param  new_size  Number of elements the %deque should contain.
-       *
-       *  This function will resize the %deque to the specified number
-       *  of elements.  If the number is smaller than the %deque's
-       *  current size the %deque is truncated, otherwise the %deque
-       *  is extended and new elements are default-constructed.
-       */
-      void
-      resize(size_type new_size)
-      { resize(new_size, value_type()); }
-
       /**
        *  Returns true if the %deque is empty.  (Thus begin() would
        *  equal end().)
index 879048063d1e99617a68eeab5a6ba7e969d29768..e17ec2b46068156b4ae50f2814f24804c215da4e 100644 (file)
@@ -472,23 +472,12 @@ namespace _GLIBCXX_STD
        *
        *  This constructor fills the %list with @a n copies of @a value.
        */
-      list(size_type __n, const value_type& __value,
+      explicit
+      list(size_type __n, const value_type& __value = value_type(),
           const allocator_type& __a = allocator_type())
       : _Base(__a)
       { this->insert(begin(), __n, __value); }
 
-      /**
-       *  @brief  Create a %list with default elements.
-       *  @param  n  The number of elements to initially create.
-       *
-       *  This constructor fills the %list with @a n copies of a
-       *  default-constructed element.
-       */
-      explicit
-      list(size_type __n)
-      : _Base(allocator_type())
-      { this->insert(begin(), __n, value_type()); }
-
       /**
        *  @brief  %List copy constructor.
        *  @param  x  A %list of identical element and allocator types.
@@ -679,20 +668,7 @@ namespace _GLIBCXX_STD
        *  extended and new elements are populated with given data.
        */
       void
-      resize(size_type __new_size, const value_type& __x);
-
-      /**
-       *  @brief  Resizes the %list to the specified number of elements.
-       *  @param  new_size  Number of elements the %list should contain.
-       *
-       *  This function will resize the %list to the specified number of
-       *  elements.  If the number is smaller than the %list's current
-       *  size the %list is truncated, otherwise the %list is extended
-       *  and new elements are default-constructed.
-       */
-      void
-      resize(size_type __new_size)
-      { this->resize(__new_size, value_type()); }
+      resize(size_type __new_size, value_type __x = value_type());
 
       // element access
       /**
index dccc9dd96234d8c572bdd36ed48bb7d4af7f6546..06b94017c010d1a717bb4cff7dda9e21c5a27d46 100644 (file)
@@ -206,7 +206,8 @@ namespace _GLIBCXX_STD
        *
        *  This constructor fills the %vector with @a n copies of @a value.
        */
-      vector(size_type __n, const value_type& __value,
+      explicit
+      vector(size_type __n, const value_type& __value = value_type(),
             const allocator_type& __a = allocator_type())
       : _Base(__n, __a)
       {
@@ -215,22 +216,6 @@ namespace _GLIBCXX_STD
        this->_M_impl._M_finish = this->_M_impl._M_start + __n;
       }
 
-      /**
-       *  @brief  Create a %vector with default elements.
-       *  @param  n  The number of elements to initially create.
-       *
-       *  This constructor fills the %vector with @a n copies of a
-       *  default-constructed element.
-       */
-      explicit
-      vector(size_type __n)
-      : _Base(__n, allocator_type())
-      {
-       std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, value_type(),
-                                     _M_get_Tp_allocator());
-       this->_M_impl._M_finish = this->_M_impl._M_start + __n; 
-      }
-
       /**
        *  @brief  %Vector copy constructor.
        *  @param  x  A %vector of identical element and allocator types.
@@ -429,7 +414,7 @@ namespace _GLIBCXX_STD
        *  given data.
        */
       void
-      resize(size_type __new_size, const value_type& __x)
+      resize(size_type __new_size, value_type __x = value_type())
       {
        if (__new_size < size())
          erase(begin() + __new_size, end());
@@ -437,20 +422,6 @@ namespace _GLIBCXX_STD
          insert(end(), __new_size - size(), __x);
       }
 
-      /**
-       *  @brief  Resizes the %vector to the specified number of elements.
-       *  @param  new_size  Number of elements the %vector should contain.
-       *
-       *  This function will resize the %vector to the specified
-       *  number of elements.  If the number is smaller than the
-       *  %vector's current size the %vector is truncated, otherwise
-       *  the %vector is extended and new elements are
-       *  default-constructed.
-       */
-      void
-      resize(size_type __new_size)
-      { resize(__new_size, value_type()); }
-
       /**
        *  Returns the total number of elements that the %vector can
        *  hold before needing to allocate more memory.
diff --git a/libstdc++-v3/testsuite/23_containers/deque/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/deque/explicit_instantiation/2.cc
new file mode 100644 (file)
index 0000000..7084ff7
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2004 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// This file tests explicit instantiation of library containers
+
+#include <deque>
+#include <testsuite_hooks.h>
+
+// { dg-do compile }
+
+template class std::deque<__gnu_test::NonDefaultConstructible>;
diff --git a/libstdc++-v3/testsuite/23_containers/list/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/list/explicit_instantiation/2.cc
new file mode 100644 (file)
index 0000000..66d3934
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2004 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// This file tests explicit instantiation of library containers
+
+#include <list>
+#include <testsuite_hooks.h>
+
+// { dg-do compile }
+
+template class std::list<__gnu_test::NonDefaultConstructible>;
diff --git a/libstdc++-v3/testsuite/23_containers/map/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/map/explicit_instantiation/2.cc
new file mode 100644 (file)
index 0000000..8c3c744
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright (C) 2004 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// This file tests explicit instantiation of library containers
+
+#include <map>
+#include <testsuite_hooks.h>
+
+// { dg-do compile }
+
+// N.B. We cannot instantiate with T == NonDefaultConstructible
+// because of 23.3.1.2.
+template class std::map<__gnu_test::NonDefaultConstructible, double>;
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/multimap/explicit_instantiation/2.cc
new file mode 100644 (file)
index 0000000..46181ef
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright (C) 2004 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// This file tests explicit instantiation of library containers
+
+#include <map>
+#include <testsuite_hooks.h>
+
+// { dg-do compile }
+
+template class std::multimap<__gnu_test::NonDefaultConstructible,
+                            __gnu_test::NonDefaultConstructible>;
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/multiset/explicit_instantiation/2.cc
new file mode 100644 (file)
index 0000000..0f5f308
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2004 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// This file tests explicit instantiation of library containers
+
+#include <set>
+#include <testsuite_hooks.h>
+
+// { dg-do compile }
+
+template class std::multiset<__gnu_test::NonDefaultConstructible>;
diff --git a/libstdc++-v3/testsuite/23_containers/set/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/set/explicit_instantiation/2.cc
new file mode 100644 (file)
index 0000000..418c80e
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2004 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// This file tests explicit instantiation of library containers
+
+#include <set>
+#include <testsuite_hooks.h>
+
+// { dg-do compile }
+
+template class std::set<__gnu_test::NonDefaultConstructible>;
diff --git a/libstdc++-v3/testsuite/23_containers/vector/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/vector/explicit_instantiation/2.cc
new file mode 100644 (file)
index 0000000..7020d42
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright (C) 2004 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 2, 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 COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// This file tests explicit instantiation of library containers
+
+#include <vector>
+#include <testsuite_hooks.h>
+
+// { dg-do compile }
+
+template class std::vector<__gnu_test::NonDefaultConstructible>;
index 90104d36523b168e677b4db1215f30c0b28a107e..fc05186d400db95074f21df5b210d3e476bdc47b 100644 (file)
@@ -160,6 +160,24 @@ namespace __gnu_test
   void 
   run_tests_wrapped_env(const char*, const char*, const func_callback&);
 
+
+  // For containers (23.1/3).
+  struct NonDefaultConstructible
+  {
+    NonDefaultConstructible(int) { }
+  };
+  inline bool
+  operator==(const NonDefaultConstructible& lhs,
+            const NonDefaultConstructible& rhs)
+  { return false; }
+
+  inline bool
+  operator<(const NonDefaultConstructible& lhs,
+           const NonDefaultConstructible& rhs)
+  { return false; }
+
+
   // Counting.
   struct counter
   {
This page took 0.094807 seconds and 5 git commands to generate.