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 32,670 of 33,346    |
|    Zhihao Yuan to All    |
|    Re: How to write an is_nothrow_swapable<    |
|    21 Nov 12 23:44:59    |
      From: lichray@googlemail.com              On Wednesday, November 21, 2012 2:42:26 PM UTC-6, Daniel Krügler wrote:       > I'm not sure whether I understood your question correctly, because you       > mention (a) the ability to work on just a type and (b) you refer to       > is_swapable (instead of is_nothrow_swapable). I guess that (b) is just a       > thinko on your side. What about a variation of your constexpr function              The reason I tried to mix those two tests is that, I found some swap()       member functions are not declared as noexcept in gcc-4.7, so I wanted       to bypass it. But latter I found that in gcc-4.8, these classes are       really not non-throw swappable, so I switched to an exception-       transparency design of my own swap() functions.              Thank you, the people who replied me. std::declval is really helpful,       since gcc does not support `this' in the noexcept operator and       trailing return type :(                     --        [ 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