OSDN Git Service

PR libstdc++/53978
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Jul 2012 20:47:40 +0000 (20:47 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Jul 2012 20:47:40 +0000 (20:47 +0000)
* include/bits/alloc_traits.h (allocator_traits): Define static
constants.
* include/bits/ptr_traits.h (pointer_traits): Likewise.
* include/ext/alloc_traits.h (__allocator_always_compares_equal):
Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@189548 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/alloc_traits.h
libstdc++-v3/include/bits/ptr_traits.h
libstdc++-v3/include/ext/alloc_traits.h

index 7ca286e..e732667 100644 (file)
@@ -1,3 +1,12 @@
+2012-07-16  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR libstdc++/53978
+       * include/bits/alloc_traits.h (allocator_traits): Define static
+       constants.
+       * include/bits/ptr_traits.h (pointer_traits): Likewise.
+       * include/ext/alloc_traits.h (__allocator_always_compares_equal):
+       Likewise.
+
 2012-07-13  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR libstdc++/53657
 2012-07-13  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR libstdc++/53657
index e1f4d41..3b12981 100644 (file)
@@ -1,6 +1,6 @@
 // Allocator traits -*- C++ -*-
 
 // Allocator traits -*- C++ -*-
 
-// Copyright (C) 2011 Free Software Foundation, Inc.
+// Copyright (C) 2011, 2012 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
 //
 // 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
@@ -56,6 +56,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       static const bool __value = _S_chk<_Alloc, _Tp>(nullptr);
     };
 
       static const bool __value = _S_chk<_Alloc, _Tp>(nullptr);
     };
 
+  template<typename _Alloc, typename _Tp>
+    const bool __alloctr_rebind_helper<_Alloc, _Tp>::__value;
+
   template<typename _Alloc, typename _Tp,
            bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value>
     struct __alloctr_rebind;
   template<typename _Alloc, typename _Tp,
            bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value>
     struct __alloctr_rebind;
@@ -423,6 +426,27 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
     };
 
   template<typename _Alloc>
     };
 
   template<typename _Alloc>
+  template<typename _Alloc2>
+    const bool allocator_traits<_Alloc>::__allocate_helper<_Alloc2>::value;
+
+  template<typename _Alloc>
+  template<typename _Tp, typename... _Args>
+    const bool
+    allocator_traits<_Alloc>::__construct_helper<_Tp, _Args...>::value;
+
+  template<typename _Alloc>
+  template<typename _Tp>
+    const bool allocator_traits<_Alloc>::__destroy_helper<_Tp>::value;
+
+  template<typename _Alloc>
+  template<typename _Alloc2>
+    const bool allocator_traits<_Alloc>::__maxsize_helper<_Alloc2>::value;
+
+  template<typename _Alloc>
+  template<typename _Alloc2>
+    const bool allocator_traits<_Alloc>::__select_helper<_Alloc2>::value;
+
+  template<typename _Alloc>
     inline void
     __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type)
     { __one = __two; }
     inline void
     __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type)
     { __one = __two; }
index bba9b49..c364b2d 100644 (file)
@@ -1,6 +1,6 @@
 // Pointer Traits -*- C++ -*-
 
 // Pointer Traits -*- C++ -*-
 
-// Copyright (C) 2011 Free Software Foundation, Inc.
+// Copyright (C) 2011, 2012 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
 //
 // 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
@@ -86,6 +86,9 @@ _GLIBCXX_HAS_NESTED_TYPE(difference_type)
       static const bool __value = _S_chk<_Ptr, _Up>(nullptr);
     };
 
       static const bool __value = _S_chk<_Ptr, _Up>(nullptr);
     };
 
+  template<typename _Ptr, typename _Up>
+    const bool __ptrtr_rebind_helper<_Ptr, _Up>::__value;
+
   template<typename _Tp, typename _Up,
            bool = __ptrtr_rebind_helper<_Tp, _Up>::__value>
     struct __ptrtr_rebind;
   template<typename _Tp, typename _Up,
            bool = __ptrtr_rebind_helper<_Tp, _Up>::__value>
     struct __ptrtr_rebind;
index 4862636..4bfe617 100644 (file)
@@ -1,6 +1,6 @@
 // Allocator traits -*- C++ -*-
 
 // Allocator traits -*- C++ -*-
 
-// Copyright (C) 2011 Free Software Foundation, Inc.
+// Copyright (C) 2011, 2012 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
 //
 // 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
@@ -49,37 +49,56 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-template<typename _Alloc>
-  struct __allocator_always_compares_equal
-  { static const bool value = false; };
+  template<typename _Alloc>
+    struct __allocator_always_compares_equal
+    { static const bool value = false; };
+
+  template<typename _Alloc>
+    const bool __allocator_always_compares_equal<_Alloc>::value;
 
   template<typename _Tp>
     struct __allocator_always_compares_equal<std::allocator<_Tp>>
     { static const bool value = true; };
 
 
   template<typename _Tp>
     struct __allocator_always_compares_equal<std::allocator<_Tp>>
     { static const bool value = true; };
 
+  template<typename _Tp>
+    const bool __allocator_always_compares_equal<std::allocator<_Tp>>::value;
+
   template<typename, typename> struct array_allocator;
 
   template<typename _Tp, typename _Array>
     struct __allocator_always_compares_equal<array_allocator<_Tp, _Array>>
     { static const bool value = true; };
 
   template<typename, typename> struct array_allocator;
 
   template<typename _Tp, typename _Array>
     struct __allocator_always_compares_equal<array_allocator<_Tp, _Array>>
     { static const bool value = true; };
 
+  template<typename _Tp, typename _Array>
+    const bool
+    __allocator_always_compares_equal<array_allocator<_Tp, _Array>>::value;
+
   template<typename> struct mt_allocator;
 
   template<typename _Tp>
     struct __allocator_always_compares_equal<mt_allocator<_Tp>>
     { static const bool value = true; };
 
   template<typename> struct mt_allocator;
 
   template<typename _Tp>
     struct __allocator_always_compares_equal<mt_allocator<_Tp>>
     { static const bool value = true; };
 
+  template<typename _Tp>
+    const bool __allocator_always_compares_equal<mt_allocator<_Tp>>::value;
+
   template<typename> struct new_allocator;
 
   template<typename _Tp>
     struct __allocator_always_compares_equal<new_allocator<_Tp>>
     { static const bool value = true; };
 
   template<typename> struct new_allocator;
 
   template<typename _Tp>
     struct __allocator_always_compares_equal<new_allocator<_Tp>>
     { static const bool value = true; };
 
+  template<typename _Tp>
+    const bool __allocator_always_compares_equal<new_allocator<_Tp>>::value;
+
   template<typename> struct pool_allocator;
 
   template<typename _Tp>
     struct __allocator_always_compares_equal<pool_allocator<_Tp>>
     { static const bool value = true; };
   template<typename> struct pool_allocator;
 
   template<typename _Tp>
     struct __allocator_always_compares_equal<pool_allocator<_Tp>>
     { static const bool value = true; };
+
+  template<typename _Tp>
+    const bool __allocator_always_compares_equal<pool_allocator<_Tp>>::value;
 #endif
 
 /**
 #endif
 
 /**