Re: Templats and I/O operators (<< >>)
From: Martijn Lievaart (m_at_remove.this.part.rtij.nl)
Date: 01/01/04
- Next message: Maya: "Re: Unix clones and Windows"
- Previous message: Chris \( Val \): "Re: Templats and I/O operators (<< >>)"
- In reply to: Chris \( Val \): "Re: Templats and I/O operators (<< >>)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Maya: "Re: Unix clones and Windows"
- Previous message: Chris \( Val \): "Re: Templats and I/O operators (<< >>)"
- In reply to: Chris \( Val \): "Re: Templats and I/O operators (<< >>)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|