Boost logo

Boost :

From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2001-05-23 15:51:26


John Max Skaller wrote:

> class X {
> friend void nf() {}
> void method();
> };

> void X::method() { nf(); } // found

This appears to be incorrect. nf() is not found, because
it does not have any arguments, and thus Koenig lookup does
not apply, therefore "nf" is looked up using ordinary
lookup only. And that does not find nf(), because it's
not (visibly) declared yet.

> When you start using templates all hell breaks loose.

I tend to disagree.

Jens Maurer


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