This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Remove unnecessary forward declarations


Hi,

this started yesterday, when I noticed that std::set and multiset and multimap - but *not* std::map - had on top forward declarations for the benefit of friendship. Those declarations appeared the first time in gcc3.0, probably to work around limitations of the C++ front-end, but in fact are not required by the standard, because we are granting friendship to all instances of the given template functions (*). As happens, there are quite a few additional examples of the issue, some recently added by myself in tr1::random and a couple other places.

This patch is a pure clean-up, doesn't properly belong to this Stage, but I'd really like to apply it anyway: if it's true, as a friend of mine explained, that some people look at the sources of the library while learning C++ (!), then what we have here is simply horrible. I will wait 'til this evening.

Tested x86-linux.

Paolo.

(*) People looking for a clear explanation outside the standard, may go to Lippman, Lajoie, Moo, p. 658, for example.

////////////////////
2006-09-21  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/hash_map: Remove forward declaration of equality
	operator, not needed for friendship of all its istances.
	* include/ext/hash_set: Likewise.
	* include/bits/stl_set.h: Likewise for equality operator and
	operator less.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_queue.h: Likewise.
	* include/bits/stl_stack.h: Likewise.
	* include/bits/streambuf_iterator.h: Likewise for copy.
	* include/std/std_streambuf.h: Likewise for __copy_aux and find.
	* include/tr1/boost_shared_ptr.h: Likewise for get_deleter.
	* include/tr1/random: Likewise, remove all forward declarations
	of inserters and extractors.
Index: include/ext/hash_map
===================================================================
--- include/ext/hash_map	(revision 117111)
+++ include/ext/hash_map	(working copy)
@@ -72,23 +72,13 @@
   using std::pair;
   using std::_Select1st;
 
-  // Forward declaration of equality operator; needed for friend
-  // declaration.
-  template<class _Key, class _Tp, class _HashFn = hash<_Key>,
-	   class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
-    class hash_map;
-
-  template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
-    inline bool
-    operator==(const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&,
-	       const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&);
-
   /**
    *  This is an SGI extension.
    *  @ingroup SGIextensions
    *  @doctodo
    */
-  template<class _Key, class _Tp, class _HashFn, class _EqualKey, class _Alloc>
+  template<class _Key, class _Tp, class _HashFn = hash<_Key>,
+	   class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
     class hash_map
     {
     private:
@@ -295,25 +285,16 @@
 	 hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
     { __hm1.swap(__hm2); }
 
-  // Forward declaration of equality operator; needed for friend declaration.
-  template<class _Key, class _Tp,
-	    class _HashFn  = hash<_Key>,
-	    class _EqualKey = equal_to<_Key>,
-	    class _Alloc =  allocator<_Tp> >
-    class hash_multimap;
 
-  template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
-    inline bool
-    operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
-	       const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2);
-
   /**
    *  This is an SGI extension.
    *  @ingroup SGIextensions
    *  @doctodo
    */
-  template<class _Key, class _Tp, class _HashFn, class _EqualKey,
-	    class _Alloc>
+  template<class _Key, class _Tp,
+	   class _HashFn = hash<_Key>,
+	   class _EqualKey = equal_to<_Key>,
+	   class _Alloc = allocator<_Tp> >
     class hash_multimap
     {
       // concept requirements
Index: include/ext/hash_set
===================================================================
--- include/ext/hash_set	(revision 117111)
+++ include/ext/hash_set	(working copy)
@@ -72,24 +72,14 @@
   using std::pair;
   using std::_Identity;
 
-  // Forward declaration of equality operator; needed for friend
-  // declaration.
-  template<class _Value, class _HashFcn  = hash<_Value>,
-	    class _EqualKey = equal_to<_Value>,
-	    class _Alloc = allocator<_Value> >
-    class hash_set;
-
-  template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
-    inline bool
-    operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
-	       const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2);
-
   /**
    *  This is an SGI extension.
    *  @ingroup SGIextensions
    *  @doctodo
    */
-  template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+  template<class _Value, class _HashFcn  = hash<_Value>,
+	   class _EqualKey = equal_to<_Value>,
+	   class _Alloc = allocator<_Value> >
     class hash_set
     {
       // concept requirements
@@ -285,24 +275,16 @@
 	 hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
     { __hs1.swap(__hs2); }
 
-  template<class _Value,
-	    class _HashFcn = hash<_Value>,
-	    class _EqualKey = equal_to<_Value>,
-	    class _Alloc = allocator<_Value> >
-    class hash_multiset;
 
-  template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
-    inline bool
-    operator==(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
-	       const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2);
-
-
   /**
    *  This is an SGI extension.
    *  @ingroup SGIextensions
    *  @doctodo
    */
-  template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+  template<class _Value,
+	   class _HashFcn = hash<_Value>,
+	   class _EqualKey = equal_to<_Value>,
+	   class _Alloc = allocator<_Value> >
     class hash_multiset
     {
       // concept requirements
Index: include/bits/stl_queue.h
===================================================================
--- include/bits/stl_queue.h	(revision 117111)
+++ include/bits/stl_queue.h	(working copy)
@@ -67,18 +67,6 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
-  // Forward declarations of operators < and ==, needed for friend declaration.
-  template<typename _Tp, typename _Sequence = deque<_Tp> >
-    class queue;
-
-  template<typename _Tp, typename _Seq>
-    inline bool
-    operator==(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&);
-
-  template<typename _Tp, typename _Seq>
-    inline bool
-    operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&);
-
   /**
    *  @brief  A standard container giving FIFO behavior.
    *
@@ -103,7 +91,7 @@
    *  which is a typedef for the second Sequence parameter, and @c push and
    *  @c pop, which are standard %queue/FIFO operations.
   */
-  template<typename _Tp, typename _Sequence>
+  template<typename _Tp, typename _Sequence = deque<_Tp> >
     class queue
     {
       // concept requirements
Index: include/bits/stl_set.h
===================================================================
--- include/bits/stl_set.h	(revision 117111)
+++ include/bits/stl_set.h	(working copy)
@@ -65,21 +65,6 @@
 
 _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
 
-  // Forward declarations of operators < and ==, needed for friend declaration.
-  template<class _Key, class _Compare = std::less<_Key>,
-	   class _Alloc = std::allocator<_Key> >
-    class set;
-
-  template<class _Key, class _Compare, class _Alloc>
-    inline bool
-    operator==(const set<_Key, _Compare, _Alloc>& __x,
-	       const set<_Key, _Compare, _Alloc>& __y);
-
-  template<class _Key, class _Compare, class _Alloc>
-    inline bool
-    operator<(const set<_Key, _Compare, _Alloc>& __x,
-	      const set<_Key, _Compare, _Alloc>& __y);
-
   /**
    *  @brief A standard container made up of unique keys, which can be
    *  retrieved in logarithmic time.
@@ -103,7 +88,8 @@
    *  called (*_unique versus *_equal, same as the standard).
    *  @endif
   */
-  template<class _Key, class _Compare, class _Alloc>
+  template<class _Key, class _Compare = std::less<_Key>,
+	   class _Alloc = std::allocator<_Key> >
     class set
     {
       // concept requirements
Index: include/bits/stl_stack.h
===================================================================
--- include/bits/stl_stack.h	(revision 117111)
+++ include/bits/stl_stack.h	(working copy)
@@ -67,19 +67,6 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
-  // Forward declarations of operators == and <, needed for friend
-  // declaration.
-  template<typename _Tp, typename _Sequence = deque<_Tp> >
-    class stack;
-
-  template<typename _Tp, typename _Seq>
-    inline bool
-    operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y);
-
-  template<typename _Tp, typename _Seq>
-    inline bool
-    operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y);
-
   /**
    *  @brief  A standard container giving FILO behavior.
    *
@@ -107,7 +94,7 @@
    *  push, @c pop, and @c top, which are standard %stack/FILO
    *  operations.
   */
-  template<typename _Tp, typename _Sequence>
+  template<typename _Tp, typename _Sequence = deque<_Tp> >
     class stack
     {
       // concept requirements
Index: include/bits/stl_multimap.h
===================================================================
--- include/bits/stl_multimap.h	(revision 117111)
+++ include/bits/stl_multimap.h	(working copy)
@@ -65,23 +65,6 @@
 
 _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
 
-  // Forward declaration of operators < and ==, needed for friend declaration.
-
-  template <typename _Key, typename _Tp,
-            typename _Compare = std::less<_Key>,
-            typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
-    class multimap;
-
-  template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
-    inline bool
-    operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
-	       const multimap<_Key, _Tp, _Compare, _Alloc>& __y);
-
-  template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
-    inline bool
-    operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
-	      const multimap<_Key, _Tp, _Compare, _Alloc>& __y);
-
   /**
    *  @brief A standard container made up of (key,value) pairs, which can be
    *  retrieved based on a key, in logarithmic time.
@@ -103,7 +86,9 @@
    *  called (*_unique versus *_equal, same as the standard).
    *  @endif
   */
-  template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+  template <typename _Key, typename _Tp,
+	    typename _Compare = std::less<_Key>,
+	    typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
     class multimap
     {
     public:
Index: include/bits/stl_multiset.h
===================================================================
--- include/bits/stl_multiset.h	(revision 117111)
+++ include/bits/stl_multiset.h	(working copy)
@@ -65,21 +65,6 @@
 
 _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
 
-  // Forward declaration of operators < and ==, needed for friend declaration.
-  template <class _Key, class _Compare = std::less<_Key>,
-	    class _Alloc = std::allocator<_Key> >
-    class multiset;
-
-  template <class _Key, class _Compare, class _Alloc>
-    inline bool
-    operator==(const multiset<_Key, _Compare, _Alloc>& __x,
-	       const multiset<_Key, _Compare, _Alloc>& __y);
-
-  template <class _Key, class _Compare, class _Alloc>
-    inline bool
-    operator<(const multiset<_Key, _Compare, _Alloc>& __x,
-	      const multiset<_Key, _Compare, _Alloc>& __y);
-
   /**
    *  @brief A standard container made up of elements, which can be retrieved
    *  in logarithmic time.
@@ -100,7 +85,8 @@
    *  called (*_unique versus *_equal, same as the standard).
    *  @endif
   */
-  template <class _Key, class _Compare, class _Alloc>
+  template <class _Key, class _Compare = std::less<_Key>,
+	    class _Alloc = std::allocator<_Key> >
     class multiset
     {
       // concept requirements
Index: include/bits/streambuf_iterator.h
===================================================================
--- include/bits/streambuf_iterator.h	(revision 117111)
+++ include/bits/streambuf_iterator.h	(working copy)
@@ -43,12 +43,6 @@
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
      
-  template<typename _CharT>
-    typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 
-  	                            ostreambuf_iterator<_CharT> >::__type
-    copy(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
-	 ostreambuf_iterator<_CharT>);
-
   // 24.5.3 Template class istreambuf_iterator
   /// Provides input iterator semantics for streambufs.
   template<typename _CharT, typename _Traits>
Index: include/tr1/random
===================================================================
--- include/tr1/random	(revision 117111)
+++ include/tr1/random	(working copy)
@@ -296,21 +296,6 @@
    * The size of the state is @f$ 1 @f$.
    */
   template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-    class linear_congruential;
-
-  template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m,
-	   typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const linear_congruential<_UIntType, __a, __c, __m>& __lcr);
-
-  template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m,
-	   typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       linear_congruential<_UIntType, __a, __c, __m>& __lcr);
-
-  template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
     class linear_congruential
     {
       __glibcxx_class_requires(_UIntType, _UnsignedIntegerConcept)
@@ -506,29 +491,6 @@
   template<class _UIntType, int __w, int __n, int __m, int __r,
 	   _UIntType __a, int __u, int __s, _UIntType __b, int __t,
 	   _UIntType __c, int __l>
-    class mersenne_twister;
-
-  template<class _UIntType, int __w, int __n, int __m, int __r,
-	   _UIntType __a, int __u, int __s, _UIntType __b, int __t,
-	   _UIntType __c, int __l,
-	   typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const mersenne_twister<_UIntType, __w, __n, __m,
-	       __r, __a, __u, __s, __b, __t, __c, __l>& __x);
-
-  template<class _UIntType, int __w, int __n, int __m, int __r,
-	   _UIntType __a, int __u, int __s, _UIntType __b, int __t,
-	   _UIntType __c, int __l,
-	   typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       mersenne_twister<_UIntType, __w, __n, __m,
-	       __r, __a, __u, __s, __b, __t, __c, __l>& __x);
-
-  template<class _UIntType, int __w, int __n, int __m, int __r,
-	   _UIntType __a, int __u, int __s, _UIntType __b, int __t,
-	   _UIntType __c, int __l>
     class mersenne_twister
     {
       __glibcxx_class_requires(_UIntType, _UnsignedIntegerConcept)
@@ -707,21 +669,6 @@
    * @endif
    */
   template<typename _IntType, _IntType __m, int __s, int __r>
-    class subtract_with_carry;
-
-  template<typename _IntType, _IntType __m, int __s, int __r,
-	   typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const subtract_with_carry<_IntType, __m, __s, __r>& __x);
-
-  template<typename _IntType, _IntType __m, int __s, int __r,
-	   typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       subtract_with_carry<_IntType, __m, __s, __r>& __x);
-
-  template<typename _IntType, _IntType __m, int __s, int __r>
     class subtract_with_carry
     {
       __glibcxx_class_requires(_IntType, _IntegerConcept)
@@ -899,21 +846,6 @@
    * @endif
    */
   template<typename _RealType, int __w, int __s, int __r>
-    class subtract_with_carry_01;
-
-  template<typename _RealType, int __w, int __s, int __r,
-	   typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const subtract_with_carry_01<_RealType, __w, __s, __r>& __x);
-
-  template<typename _RealType, int __w, int __s, int __r,
-	   typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       subtract_with_carry_01<_RealType, __w, __s, __r>& __x);
-
-  template<typename _RealType, int __w, int __s, int __r>
     class subtract_with_carry_01
     {
     public:
@@ -1105,22 +1037,6 @@
    * 0 <= @p __r <= @p __p
    */
   template<class _UniformRandomNumberGenerator, int __p, int __r>
-    class discard_block;
-
-  template<class _UniformRandomNumberGenerator, int __p, int __r,
-	   typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const discard_block<_UniformRandomNumberGenerator,
-	       __p, __r>& __x);
-
-  template<class _UniformRandomNumberGenerator, int __p, int __r,
-	   typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       discard_block<_UniformRandomNumberGenerator, __p, __r>& __x);
-
-  template<class _UniformRandomNumberGenerator, int __p, int __r>
     class discard_block
     {
       // __glibcxx_class_requires(typename base_type::result_type,
@@ -1327,26 +1243,6 @@
    */
   template<class _UniformRandomNumberGenerator1, int __s1,
 	   class _UniformRandomNumberGenerator2, int __s2>
-    class xor_combine;
-
-  template<class _UniformRandomNumberGenerator1, int __s1,
-	   class _UniformRandomNumberGenerator2, int __s2,
-	   typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const xor_combine<_UniformRandomNumberGenerator1, __s1,
-	       _UniformRandomNumberGenerator2, __s2>& __x);
-
-  template<class _UniformRandomNumberGenerator1, int __s1,
-	   class _UniformRandomNumberGenerator2, int __s2,
-	   typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       xor_combine<_UniformRandomNumberGenerator1, __s1,
-	       _UniformRandomNumberGenerator2, __s2>& __x);
-
-  template<class _UniformRandomNumberGenerator1, int __s1,
-	   class _UniformRandomNumberGenerator2, int __s2>
     class xor_combine
     {
       // __glibcxx_class_requires(typename _UniformRandomNumberGenerator1::
@@ -1616,19 +1512,6 @@
    * probability throughout the range.
    */
   template<typename _IntType = int>
-    class uniform_int;
-
-  template<typename _IntType, typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const uniform_int<_IntType>& __x);
-
-  template<typename _IntType, typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       uniform_int<_IntType>& __x);
-
-  template<typename _IntType>
     class uniform_int
     {
       __glibcxx_class_requires(_IntType, _IntegerConcept)
@@ -1855,15 +1738,6 @@
    * distribution.
    */
   template<typename _IntType = int, typename _RealType = double>
-    class geometric_distribution;
-
-  template<typename _IntType, typename _RealType,
-	   typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const geometric_distribution<_IntType, _RealType>& __x);
-
-  template<typename _IntType, typename _RealType>
     class geometric_distribution
     {
     public:
@@ -1951,21 +1825,6 @@
    * parameter of the distribution.
    */
   template<typename _IntType = int, typename _RealType = double>
-    class poisson_distribution;
-
-  template<typename _IntType, typename _RealType,
-	   typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const poisson_distribution<_IntType, _RealType>& __x);
-
-  template<typename _IntType, typename _RealType,
-	   typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       poisson_distribution<_IntType, _RealType>& __x);
-
-  template<typename _IntType, typename _RealType>
     class poisson_distribution
     {
     public:
@@ -2053,21 +1912,6 @@
    * and @f$ p @f$ are the parameters of the distribution.
    */
   template<typename _IntType = int, typename _RealType = double>
-    class binomial_distribution;
-
-  template<typename _IntType, typename _RealType,
-	   typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const binomial_distribution<_IntType, _RealType>& __x);
-
-  template<typename _IntType, typename _RealType,
-	   typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       binomial_distribution<_IntType, _RealType>& __x);
-
-  template<typename _IntType, typename _RealType>
     class binomial_distribution
     {
     public:
@@ -2176,19 +2020,6 @@
    * deliver number in the range [0, 1).
    */
   template<typename _RealType = double>
-    class uniform_real;
-  
-  template<typename _RealType, typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const uniform_real<_RealType>& __x);
-
-  template<typename _RealType, typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       uniform_real<_RealType>& __x);
-
-  template<typename _RealType>
     class uniform_real
     {
     public:
@@ -2278,14 +2109,6 @@
    * </table>
    */
   template<typename _RealType = double>
-    class exponential_distribution;
-
-  template<typename _RealType, typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const exponential_distribution<_RealType>& __x);
-
-  template<typename _RealType>
     class exponential_distribution
     {
     public:
@@ -2369,19 +2192,6 @@
    *            e^{- \frac{{x - mean}^ {2}}{2 \sigma ^ {2}} } @f$.
    */
   template<typename _RealType = double>
-    class normal_distribution;
-
-  template<typename _RealType, typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const normal_distribution<_RealType>& __x);
-
-  template<typename _RealType, typename _CharT, typename _Traits>
-    std::basic_istream<_CharT, _Traits>&
-    operator>>(std::basic_istream<_CharT, _Traits>& __is,
-	       normal_distribution<_RealType>& __x);
-
-  template<typename _RealType>
     class normal_distribution
     {
     public:
@@ -2471,14 +2281,6 @@
    * @f$ p(x) = \frac{1}{\Gamma(\alpha)} x^{\alpha - 1} e^{-x} } @f$.
    */
   template<typename _RealType = double>
-    class gamma_distribution;
-
-  template<typename _RealType, typename _CharT, typename _Traits>
-    std::basic_ostream<_CharT, _Traits>&
-    operator<<(std::basic_ostream<_CharT, _Traits>& __os,
-	       const gamma_distribution<_RealType>& __x);
-
-  template<typename _RealType>
     class gamma_distribution
     {
     public:
Index: include/tr1/boost_shared_ptr.h
===================================================================
--- include/tr1/boost_shared_ptr.h	(revision 117111)
+++ include/tr1/boost_shared_ptr.h	(working copy)
@@ -483,11 +483,6 @@
   { }
 
 
-// Function get_deleter must be declared before friend declaration by
-// shared_ptr.
-template<typename _Del, typename _Tp, _Lock_policy _Lp>
-  _Del* get_deleter(const __shared_ptr<_Tp, _Lp>&);
-
 /**
  *  @class shared_ptr <tr1/memory>
  *
Index: include/std/std_streambuf.h
===================================================================
--- include/std/std_streambuf.h	(revision 117111)
+++ include/std/std_streambuf.h	(working copy)
@@ -60,18 +60,6 @@
     __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*,
 			  basic_streambuf<_CharT, _Traits>*, bool&);
 
-  template<typename _CharT>
-    typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 
-				    _CharT*>::__type
-    __copy_aux(istreambuf_iterator<_CharT>,
-	       istreambuf_iterator<_CharT>, _CharT*);
-
-  template<typename _CharT>
-    typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
-				    istreambuf_iterator<_CharT> >::__type
-    find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
-	 const _CharT&);
-
   /**
    *  @brief  The actual work of input and output (interface).
    *

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]