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,579 of 33,346   
   Gennadiy Rozental to All   
   Re: why std::vector&& is not a univer   
   09 Oct 12 06:16:35   
   
   From: rogeeff@googlemail.com   
      
   { Reformatted; please limit your lines to 70 characters - mod }   
      
   On Tuesday, October 9, 2012 12:30:03 AM UTC-4, Daniel Krügler wrote:   
   > Am 09.10.2012 00:48, schrieb Gennadiy Rozental:   
   > > Any workarounds?   
   > The usual technique is to specify a function of the form T&& and to   
   > constrain it accordingly. E.g.   
   > #include    
   > #include    
      
   > template   
   > struct is_vector : std::false_type {};   
   > template   
   > struct is_vector> : std::true_type {};   
      
   While we on the subject, why doesn't standard type traits provide   
   this? Also is there any way to implement this without including   
   . It seems like we will have to include one even if my   
   specific use case does not require it.   
      
   Thank you.   
   Gennadiy   
      
      
   --   
         [ 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