From: David Abrahams (dave_at_[hidden])
Date: 2008-07-11 14:15:10
on Fri Jul 11 2008, Steven Watanabe <watanabesj-AT-gmail.com> wrote:
> David Abrahams wrote:
>> on Fri Jul 11 2008, Steven Watanabe <watanabesj-AT-gmail.com> wrote:
>>> I'm thinking that the most reliable way to deal with this is to
>>> /always/ provide forward declarations of functions that
>>> should be found by ADL, even if they are defined in a separate
>> That's a good answer. However, note that the first link you posted was
>> from someone who wouldn't want such a declaration to be seen.
> I don't think that #includeing vs. not #including a header is
> a good way to restrict the declarations present. Code that
> relies on a particular header *not* having been #included is
> fundamentally broken, IMO.
I fully agree. My point was that he's got a problem that we're not
solving by simply insisting on ODR-friendly practices.
> The only safe way to allow replacement of a library function that I
> know of is to use a macro, since this can be set globally.
Many people think macros are too ODR-prone also.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk