Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VAX 1240: enum declaration using template
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Jul 05 2004 :  12:01:37 PM  Show Profile
Another template problem.
given the following definition:
template< int column, int line >
struct HEX7
{
   enum constants
   {
      columnMask = 0xf,
      lineMask = 0x7,
   };
   enum{ value = ( (column & columnMask) << 3 ) | ( line & lineMask ) };
};


and enums using this template like this:
enum KeyCode
      {
         KeyXYZ = HEX7<0, 1>::value
      };


the definition bar shows the enum value as:
enum  KeyXYZ = HEX7<0


The default intellisense shows the definition in the tooltip as "unknown value", alternating with the VAX tooltip which shows the same as the definition bar.
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000