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 33,011 of 33,346    |
|    Daryle Walker to Daryle Walker    |
|    Re: Method to get a noexcept-swap check?    |
|    30 Apr 13 22:41:58    |
   
   From: darylew@googlemail.com   
      
   On Tuesday, April 30, 2013 3:48:42 PM UTC-4, Daryle Walker wrote:   
   > I've read about people wondering how to do:   
   >   
   > MyClass   
   > {   
   > public:   
   > //...   
   > void swap( MyClass & ) noexcept( /*What goes here?*/ );   
   > //...   
   > };   
   [SNIP]   
   > Is this viable? Is there an easier alternative?   
      
   Why yes, yes there is. I came up with it just after the first post.   
   We just combine "constexpr" with implementations on using ADL-swap:   
      
    #include
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca