home bbs files messages ]

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,162 of 33,346   
   =?windows-1252?Q?Daniel_Kr=FCgler?= to All   
   Re: why not implicit operator !=()?   
   20 Apr 12 12:23:12   
   
   649caad0   
   From: daniel.kruegler@googlemail.com   
      
   Am 20.04.2012 16:09, schrieb wasti.redl@gmx.net:   
   > On Friday, March 16, 2012 7:39:15 PM UTC+1, Daniel Krügler wrote:   
   >> There is still a problem with that approach, because it can only   
   >> reasonably work, if we have   
   >>   
   >> #include   
   >>   
   >> in scope. Arguably this introduces a nasty coupling between core   
   >> language and library (swap). I see no good solution for this at the   
   >> moment.   
   >   
   > Precedent:   
   > auto t = {1, 2, 3};   
   > requires  to be included. And yes, that was nasty to   
   > implement.   
      
   Your interpretation is rather interesting. To me the wording of 8.5.4   
   [dcl.init.list] p2,   
      
   "The template std::initializer_list is not predefined; if the header   
    is not included prior to a use of   
   std::initializer_list — even an implicit use in which the type is not   
   named (7.1.6.4) — the program is ill-formed."   
      
   seems rather clear that it would apply as well to 7.1.6.4   
   [dcl.spec.auto] p6 (In fact the above wording directly points to   
   7.1.6.4). In this case the above snippet would be ill-formed without   
   user-provided   
      
   #include    
      
   Could you please elaborate why you take a different position on that   
   situation?   
      
   Thanks & Greetings from Bremen,   
      
   Daniel Krügler   
      
      
   --   
         [ 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