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,535 of 33,346   
   =?ISO-8859-1?Q?Daniel_Kr=FCgler?= to Ivan Godard   
   Re: How to default an undefined operatio   
   07 Sep 12 01:04:12   
   
   From: daniel.kruegler@googlemail.com   
      
   On 2012-09-07 06:43, Ivan Godard wrote:   
   > Generalization question: your has_member_foo tests for a specific   
   > member. Can it be written to test for an arbitrary member that is an   
   > argument to the test? That is, is   
   >     has_member(someMemberName)   
   > possible, testing whether std::declval().someMemberName() exists   
   > for an argument member name?  I don't see how the desired member name   
   > could be passed; pointer-to-member seems to beg the question.   
      
   You would need to wrap this into a macro. This is the typical way how   
   this kind of code reusage is realized by template libraries like boost.   
      
   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