Re: Templats and I/O operators (<< >>)

From: Martijn Lievaart (m_at_remove.this.part.rtij.nl)
Date: 01/01/04


Date: Thu, 01 Jan 2004 15:01:53 +0100

On Fri, 02 Jan 2004 00:22:00 +1100, Chris ( Val ) wrote:

> | Inline friend definitions? Probably allowed, but it gives me the creeps. I
> | would do something like:
>
> [snip]
>
> In my Draft copy of the standard:
>
> 11.4 Friends
>
> A function can be defined in a friend declaration of a
> class if and only if the class is a nonlocal class (9.8),
> the function name is unqualified, and the function has
> namespace scope. [Example:
>
> class M {
> friend void f() { } // definition of global f, a friend of M,
> // not the definition of a member function
> };
>
> —end example] Such a function is implicitly inline.
>
> A friend function defined in a class is in the(lexical)
> scope of the class in which it is defined. A friend
> function defined outside the class is not (3.4.1).

As I said, yuck! :-)

Thx, and a happy 2004!
M4



Relevant Pages

  • Re: AMA wants stinkwheels?
    ... And it was the end of one of my worst days of flying ever. ... but the standard of behavior was not ... exactly the same tone I would people in here who call me a friend. ... I think RMD is flatlined. ...
    (rec.motorcycles.dirt)
  • Re: An Introduction: Recovery by Career Change
    ... are your friend. ... Especially when hidden inside a standard, ... harmless-looking permanent marker. ... back when I was a student. ...
    (alt.sysadmin.recovery)
  • Camcorder Advice
    ... So my friend now tells me that I won't be able to use his camcorder to ... So I am thinking of going with an HD camera rather than "standard" ... to output your movies to an easily viewable high-definition format--often, ... supports HD and if it does whether I will be able to successfully output ...
    (rec.juggling)
  • RE: Day() function - fine in one form, Error 2465 on another.
    ... file to a friend, Datedidn't work. ... "Jack Leach" wrote: ... use intinstead of standard a standard date or format function? ... Dim DDay as integer ...
    (microsoft.public.access.modulesdaovba)
  • Re: What declarations of main exist in the c standard?
    ... >> Me and a friend have a discussion about main. ... >> My friend claims that you also have a standard version with enviroment ... J.5.1 Environment arguments ... In a hosted environment, ...
    (comp.lang.c)

Loading