From: bouncer@dev.null   
      
   Dave Abrahams wrote:   
      
   > on Sun Jan 15 2012, Wil Evers wrote:   
   >   
   >> Daryle Walker wrote:   
   >>   
   >>> On Friday, December 30, 2011 7:07:26 PM UTC-5, Wil Evers wrote:   
   >>   
   >> If you really feel imag() should have a noexcept-specification: after   
   >> reading David Abrahams' reply to your post, I *think* the following   
   >> would do the job:   
   >>   
   >> noexcept(is_nothrow_default_constructible::value &&   
   >> is_nothrow_move_constructible::value);   
   >   
   > That looks right to me. I think you could also write   
   >   
   > noexcept(noexcept(T{T()}))   
   >   
   >> (I'm not 100% sure if this covers the case where T does not have an   
   >> accessible move constructor, but does have an accessible copy   
   >> constructor. Dave?)   
   >   
   > Well, accessibility (public,protected,private) doesn't have anything to   
   > do with it unless this is a friend function, but I suspect that's not   
   > what you meant.   
      
   You're right, of course. It is impossible to disable an otherwise   
   implicitly defined move constructor by declaring it private, because   
   overload resolution takes place before access control. I hadn't   
   realized that; thanks for pointing that out.   
      
   - Wil   
      
      
   --   
    [ 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)   
|