Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 c++11 type alias using keyword not always correct

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
bta Posted - Oct 17 2014 : 07:39:41 AM
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
2   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Nov 20 2015 : 4:07:54 PM
case=87178 is fixed in build 2083
(case=79779 morphed into case=87178)
accord Posted - Oct 17 2014 : 10:30:02 PM
I am seeing the same problem here. Thank you for the clear description.

case=79779

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000