Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 1999-11-13 14:15:47

> To me, friend is a scope !
> So there are member functions, free functions, and friends.

Thinking of a friend function as a scope might be useful in some contexts. I
think it could be misleading in others.

Each member function is a member of exactly one class. A friend function can
be a friend of any number of classes.

    int vb();
    struct D { friend int vb(); };
    struct A { friend int vb(); };

Given this, I'm not sure why it's good to put a function that has no friends
in a special category called "free function".

The way I see it, each non-member function can have 0 or more classes that
call it friend.

    -- Darin

Boost list run by bdawes at, gregod at, cpdaniel at, john at