Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-01-21 05:48:36


> template<typename T> struct abc{};
>
> namespace foobar{
>
> struct A {};
>
> void operator<<( abc<A> const&, char) {}
>
> }
>
> void test()
> {
> abc<foobar::A> t;
>
> t << '0';
> }
>
> This code compiles by most compilers (including online Cameau), but
> Borland
> fails it.

Thanks for the test case, I must admit until very recently I hadn't realised
that this kind of ADL (based on introspection of template arguments) was
supposed to work at all. I would rather not turn off all ADL support for
Borland, because most cases do actually work (for example ADL of swap
overloads, and finding of operators that does not involve template argument
introspection works), so I think we have two choices:

1) define a new config macro.
2) use BOOST_WORKAROUND if this problem hits you.

If the problem is limited to Borland C++ then I vote for (2) at present, but
you can always change my mind ;-)

John.


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