Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2004-10-01 13:34:37


> If you intend to make boost::iterator_core_access friend the friend
> declaration is indeed wrong as Dave suggested. There is basically no
> name lookup for friend declarations. I.e. a non qualified name in a
> friend declaration either declares a class/function in the current
> namespace or "refers" to such a thing that is in the current namespace.
>
> of boost you need to say friend class boost::iterator_core_accessIn
> order to make boost::iterator_core_access friend from a sub namespace.
>
> HTH
>
> Thomas

You basically saying that following is incorrect:

namespace out {

class A {};

namespace in {

class B {
friend class A;
};

} // namespace in

} // namespace out

I bit strange. After all at the point of friend statement there is symbol A
that fit the bill. Why exactly standard doing that?

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk