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
 c++11 type alias using keyword not always correct
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bta
Ketchup Master

Belgium
57 Posts

Posted - Oct 17 2014 :  07:39:41 AM  Show Profile  Reply with Quote
VA_X.dll file version 10.9.2048.0 built 2014.09.22
DevEnv.exe version 12.0.30723.0 Professional

It seems that the new C++11 syntax for type aliases is not always recognized correctly.

This works:

using MyString = std::string;  // MyString recognized

void f()
   {
   MyString x;  // type recognized
   x.empty();   // auto completion works nicely
   }

But as soon as you put it in a namespace it no longer works:

namespace MyLocalNamespace
   {

   using MyString = std::string;

   void f()
      {
      MyString x;
      x.empty();
      }
   }

=> MyString is not recognized as type anymore (underlined), and other features like auto completion, ... as a result no longer work.

The same is happening if you use it inside a class declaration:

class MyClass
   {
   public:
      using MyString = std::string;

      MyString getString();
   };


Bart

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 17 2014 :  10:30:02 PM  Show Profile  Reply with Quote
I am seeing the same problem here. Thank you for the clear description.

case=79779
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 20 2015 :  4:07:54 PM  Show Profile  Reply with Quote
case=87178 is fixed in build 2083
(case=79779 morphed into case=87178)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000