Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-07-11 14:15:10

on Fri Jul 11 2008, Steven Watanabe <> wrote:

> David Abrahams wrote:
>> on Fri Jul 11 2008, Steven Watanabe <> 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
>>> header.
>> 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at