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 31,732 of 33,346   
   Seungbeom Kim to All   
   Re: Specializing std::less without an op   
   10 Dec 11 05:56:13   
   
   From: musiphil@bawi.org   
      
   On 2011-12-08 09:21, Nevin ":-]" Liber wrote:   
   >   
   > Sure, but I can use other facilities to minimize the pain, as in:   
   >   
   >    bool operator<(complex const& a, complex const& b)   
   >    { return std::tie(a.re, a.im) < std::tie(b.re, b.im); }   
   >   
      
   That leads me to another question: should[n't] the library have   
   provided std::less for std::tie that doesn't just fall back to   
   operator< for std::tie, but that uses std::less for each member   
   in the same manner as operator< for std::tie does?   
      
   --   
   Seungbeom Kim   
      
      
         [ 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