[wwwdocs] Document a recent C++ friend declaration change

Kriang Lerdsuwanakij lerdsuwa@users.sourceforge.net
Wed Nov 26 14:50:00 GMT 2003


Hi

This patch documents a recently added support for a kind of friend
declaration to C++ frontend in the mainline.  OK?

--Kriang

diff -cpr wwwdocs-save/htdocs/gcc-3.4/changes.html wwwdocs-new/htdocs/gcc-3.4/changes.html
*** wwwdocs-save/htdocs/gcc-3.4/changes.html	Tue Nov 25 22:03:53 2003
--- wwwdocs-new/htdocs/gcc-3.4/changes.html	Wed Nov 26 21:22:14 2003
***************
*** 246,251 ****
--- 246,261 ----
          for example.  See the ISO C++ Standard Committee's <a
          href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#209">defect
          report #209.</a> for details.</li>
+ 
+     <li>Declaration of member functions of class templates as friends are
+ 	supported.  For example,
+ 	<pre>
+ 	template <typename T> struct A {
+ 	  void f();
+ 	};
+ 	class C {
+ 	  template <typename T> friend void A<T>::f();
+ 	};</pre></li>
   
      <li>You must use <code>template <></code> to introduce template
  	specializations, as required by the standard.  For example,



More information about the Gcc-patches mailing list