
Why Borland config doesn't have BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP defined? In my experience it doesn't ADL at least up to 5.6.4 (when I tried) Gennadiy

Why Borland config doesn't have BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP defined?
In my experience it doesn't ADL at least up to 5.6.4 (when I tried)
There may be corner cases that fail (no idea what they may be though, as I've never been hit by them), but mostly it certainly does work, and passes the trivial test in libs/config/test/boost_no_arg_dep_lookup.ipp. John.

Why Borland config doesn't have BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP defined?
In my experience it doesn't ADL at least up to 5.6.4 (when I tried)
There may be corner cases that fail (no idea what they may be though, as I've never been hit by them), but mostly it certainly does work, and passes the trivial test in libs/config/test/boost_no_arg_dep_lookup.ipp.
Did you tried a test with operator<<? This is primary target area for ADL, isn't it? Gennadiy

Did you tried a test with operator<<? This is primary target area for ADL, isn't it?
Here an example that shows my problem: 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. Gennadiy

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.

Hmm - It seems to me that ADL works for me with the serialization system. Most likely it mostly works but fails in some circumstances - a maddingly common occurence. I suspect what we need is an incremental tweak to the config tests to check for the existence of ADL. Robert Ramey Gennadiy Rozental wrote:
Why Borland config doesn't have BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP defined?
In my experience it doesn't ADL at least up to 5.6.4 (when I tried)
Gennadiy
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Gennadiy Rozental
-
John Maddock
-
Robert Ramey