|
Boost : |
From: rwgk_at_[hidden]
Date: 2001-05-18 17:15:49
--- In boost_at_y..., "David Abrahams" <abrahams_at_m...> wrote:
> all to_python functions need an extra argument so that koening
lookup can
> find them.
Do all compiler support Koenig lookup?
For some reason I believe that VC6 does not.
Will the proposed changes still work with VC6?
Is this because that compiler supports the non-conforming
lookup of friend functions?
Would this be a valid summary:
- A fully conforming compiler will find the friend functions
through Koenig lookup, and only through Koenig lookup.
- Less than fully conforming compilers (all but the latest
Compaq compiler) will find the friend functions through
normal lookup (because the friend functions are implicitly
declared in the namespace that encloses their class).
Ralf
P.S.: An anecdotal remark: when trying to understand (bits of)
the Boost.Python code I had real trouble because I was not
aware of the fact that the friend functions are
implicitly declared in the namespace that encloses their
class. When I found this out the hard way I was really
surprised and I found it very sneaky. This experience
as a novice to C++ suggests that the standard conforming
behavior is probably more intuitive. -- But then again,
what exactly is Koenig lookup? (no response expected)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk