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,236 of 33,346   
   =?ISO-8859-1?Q?Daniel_Kr=FCgler?= to Jeffrey Schwab   
   Re: copy constructor with allocator   
   03 May 12 01:20:05   
   
   9545b724   
   From: daniel.kruegler@googlemail.com   
      
   On 2012-05-03 06:25, Jeffrey Schwab wrote:   
   > In the following program, why is no constructor found for 's2'?   
      
   Good question.   
      
   > I expected the constructor from [string.cons] paragraph 17 to be found.   
      
   Me too.   
      
   > #include   
   > #include   
   >   
   > int main()   
   > {   
   >       std::allocator  a;   
   >       std::string s1(a);  // fine   
   >       std::string s2(s1, a);  // NO GOOD   
   >       std::string s3(s1.c_str(), a);  // fine   
   >       std::string s4(s1.begin(), s1.end(), a);  // fine   
   > }   
      
   The line marked with "NO GOOD" should be well-formed. I suggest to   
   create a bug report to the corresponding library implementation. I   
   assume, your test case fails for gcc, right? I couldn't find a   
   corresponding bug entry for it at the moment.   
      
   HTH & 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