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,769 of 33,346    |
|    Dave Abrahams to All    |
|    Re: Just making sure about an assumption    |
|    29 Dec 11 14:48:48    |
   
   a0ee8b92   
   From: dave@boostpro.com   
      
   on Thu Dec 29 2011, Daryle Walker wrote:   
      
   > For a function like:   
   >   
   > T my_function() noexcept(XXX)   
   > {   
   > T result = ...;   
   > //...   
   > return result;   
   > }   
   >   
   > Does XXX have to include something like   
   > is_nothrow_copy_constructible (or is it ..._assignable? Or   
   > ..._move_...?) due to the transfer of the return value to the calling   
   > function?   
      
   Yeah, _move_....   
      
   > Or does any exception there count against the calling function?   
      
   Count against?   
      
   > I hope it would be like the latter because functions can't really stop   
   > exceptions that happen during return-value transfer (since the C++   
   > runtime handles it).   
      
   IIRC, there's no automatic deduction of noexcept-ness from the return   
   type of a function. Maybe there should be.   
      
   --   
   Dave Abrahams   
   BoostPro Computing   
   http://www.boostpro.com   
      
      
    [ 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