public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [v3] improve allocator_traits test
@ 2011-06-11 15:42 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2011-06-11 15:42 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

2011-06-11  Jonathan Wakely  <jwakely.gcc@gmail.com>

        * testsuite/20_util/allocator_traits/requirements/
        explicit_instantiation.cc: Add another instantiation.

Tested x86_64-linux, committed to trunk.

[-- Attachment #2: traits-inst-test.txt --]
[-- Type: text/plain, Size: 856 bytes --]

Index: testsuite/20_util/allocator_traits/requirements/explicit_instantiation.cc
===================================================================
--- testsuite/20_util/allocator_traits/requirements/explicit_instantiation.cc	(revision 174931)
+++ testsuite/20_util/allocator_traits/requirements/explicit_instantiation.cc	(working copy)
@@ -22,8 +22,21 @@
 
 #include <memory>
 
+typedef short test_type;
+
+template<typename T>
+  struct minimal_allocator
+  {
+    typedef T value_type;
+    minimal_allocator();
+    template <typename U>
+      minimal_allocator(const minimal_allocator<U>&);
+    T* allocate(std::size_t);
+    void deallocate(T*, std::size_t);
+  };
+
 namespace std
 {
-  typedef short test_type;
   template struct allocator_traits<std::allocator<test_type>>;
+  template struct allocator_traits<minimal_allocator<test_type>>;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-11 15:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-11 15:42 [v3] improve allocator_traits test Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).