std::pairに対するoperator<<のオーバーロード

http://www.talkaboutprogramming.com/group/comp.lang.c++.moderated/messages/167810.html
わたすも引っかかったことあるな〜これ.

J. C. van Winkel points out (in c++std-lib-9565) another unexpected fact: it's impossible to output a container of std::pair's using copy and an ostream_iterator, as long as both pair-members are built-in or std:: types. That's because a user-defined operator<< for (for example) std::pair will not be found: lookup for operator<< will be performed only in namespace std. Opinions differed on whether or not this was a defect, and, if so, whether the defect is that something is wrong with user-defined functionality and std, or whether it's that the standard library does not provide an operator<< for std::pair<>.
[snip]
This is called ADL, short for Andrew's Devious Lookup. :-)
[snip]

このネタもらった!w