Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 31,853 of 33,346    |
|    =?ISO-8859-1?Q?Daniel_Kr=FCgler?= to Ulrich Eckhardt    |
|    Re: Add an explicit specialization of st    |
|    26 Jan 12 11:49:36    |
      From: daniel.kruegler@googlemail.com              On 2012-01-25 20:26, Ulrich Eckhardt wrote:       > Just wondering, why isn't there an FAQ entry? As already mentioned       > above, swap() is an important function like ctor and dtor, and getting       > it right can be tricky. Especially the OP's case concerning where to put       > the overload or the second case above where blindly calling std::swap()       > would have been the wrong thing. What else is there to pay attention to?              I agree that a new FAQ entry would make sense, but the reason why there       is yet no one is that before C++11 the ADL-lookup in regard to swap and       "swap-like" functions (e.g. iter_swap) was not really clarified. Several       issues were fixed during that process, among them              http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#187       http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226       http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#594       http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#742              In addition, a proper Swappable requirement set did not exist before       C++11, specified by              http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1771.html       http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3048.html              - Daniel                            --        [ See http://www.gotw.ca/resources/clcm.htm for info about ]        [ comp.lang.c++.moderated. First time posters: Do this! ]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca