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,302 of 33,346   
   =?ISO-8859-1?Q?Daniel_Kr=FCgler?= to All   
   Re: How to find an enum's underlying typ   
   16 May 12 17:26:48   
   
   From: daniel.kruegler@googlemail.com   
      
   Am 16.05.2012 19:37, schrieb Ivan Godard:   
   > A web search comes up with a variety of syntax:   
   > std::underlying_type::type   
      
   This is the correct way, assuming, you have header   
    included and E is an enumeration type   
      
   > std::EnumeratedType::underlyingType   
      
   I don't know what this should refer to. I'm quite sure that   
   std::EnumeratedType had never been proposed. A member type named   
   'underlyingType' would also seem quite odd given the   
      
   > etc. etc. None seem to work with gcc4.6.3.   
      
   This may very well be true (assuming that you have included the right   
   header). In this case you should try gcc 4.7 or greater. Surely gcc 4.8   
   has this type trait, but also note that this additionally requires to   
   set the compiler flag -std=c++0x (or -std=c++11 from gcc 4.8 (?) on).   
      
   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