
Paul Mensonides wrote:
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Thomas Witt
I do not get it. IIUC ADL does not apply to a qualified name. I.e. std::min is just std::min and that's it.
You have to do it to prevent macro expansion from a definition like this:
#define min(x, y) ((x) < (y) ? (x) : (y))
std::min(1, 2) // std::((1) < (2) ? (1) : (2)) (std::min)(1, 2) // (std::min)(1, 2)
Regards, Paul Mensonides
Thanks Paul. But I do understand the reason why we need to disable macro expansion (at least I think so). I was referring to the following sentence o Use boost::std_min(a,b) if you do require argument-dependent look-up. boost::std_min() delegates to std::min(). I can't see where ADL comes into play here. Thomas