From: David Abrahams (dave_at_[hidden])
Date: 2005-06-29 09:52:21
Vladimir Prus <ghost_at_[hidden]> writes:
> David Abrahams wrote:
>>> So it was huge hassle to find. Sorry, I just can't see how this can
>>> be a good idea.
>> It can be a good idea if you like to find as many errors in your code
>> as early as possible, and it can be an especially good idea if you
>> want to call functions in a consistent overload context, especially
>> with exported templates.
> Can you explain why "especially with exported templates". I heard this
> statement several times but never understood why "export" changes anything?
> Isn't instantiation point and so context the same regardless of whether
> template is exported or not?
The idea is that the author of an exported template expects to be able
to control the context of at least some of the names that are looked
up. That applies to the author of a nonexported template but he
doesn't have quite the same right to the expectation since he can't
really control the files that are #included before the template is
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk