🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Nobuhiko Katayama Thu, 25 Jan 1996 16:12
friend inline vs inline friend
#3148
Author: Nobuhiko Katayama
Date: Thu, 25 Jan 1996 16:12
22 lines
1316 bytes
Hi experts,

	Where in the draft standard, if any, says one can use (in the
class declaration),

friend inline void a(A&);

but not

inline friend void a(A&);

? I have been discussing with a compiler engineer who somehow seems to
think the above is true and makes the latter illegal. I cannot find any
place in the draft that says I cannot use the latter syntax. However, I
noticed that libg++ has changed "inline friend" to "friend inline" in its 
String class.
	Thank you for your help.
		Nobu

[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Re: friend inline vs inline friend
#3174
Author: James Kanze US/ESC 60/3/141 #407...
Date: Thu, 01 Feb 1996 01:58
40 lines
2291 bytes
In article <sc68e0s5bn.fsf@lnscu1.lns.cornell.edu>
nk@lns598.lns.cornell.edu (Nobuhiko Katayama) writes:

|> 	Where in the draft standard, if any, says one can use (in the
|> class declaration),

|> friend inline void a(A&);

|> but not

|> inline friend void a(A&);

Nowhere that I can see.

The keyword `friend' occurs as part of the decl-specifier-seq.  This
is an unordered sequence of keywords and typenames.  As far as I can
tell, even

	const char inline unsigned friend * f() ;

is be legal.  (Just because you can do it doesn't mean you
should:-).

In general, I think that good coding practice would impose a
systematic order of some sort, but the importance is consistency, not
the actual order.  (My own preference is: storage-class/typedef/friend
inline virtual/explicit type-specifier cv_qualifiers.  Withing the
type-specifier, I would generally place signed/unsigned first, and
short or long before int or double.  This preference is at least
partially historically conditioned, though.  It corresponds to what I
saw in the first C code I read.)
--
James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils, itudes et rialisations en logiciel orienti objet --
                -- A la recherche d'une activiti dans une region francophone
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads