26 Sep
2002
26 Sep
'02
3:50 p.m.
Argument-dependent lookup will ensure that any 'swap' functions in the namespaces used by 'T' will be included in the set of known swap functions, along with std::swap. Overloading and partial ordering of function templates will then take over to ensure that the appropriate swap(a, b) will be called (even if it is boost::swap).
I did not know this. I suppose this is the "Koenig lookup" that Steve mentions in his reply. I've tried this and it works with GCC 3.1 but unfortunately not with BCC 5.6 (so I think it is a Borland bug). Thank you Steve and Doug. Michele Galante Zucchetti Centro Sistemi s.p.a. m.galante@centrosistemi.it