Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Namespaces in Implement Virtual Methods

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
markyxl Posted - Apr 01 2016 : 02:52:06 AM
Given following code:

namespace SomeNamespace
{
  struct TypeInNamespace {int _x;};

  class Interface
  {
  public:
    virtual TypeInNamespace Method() = 0;
  };
}

class ImplementationClass : public SomeNamespace::Interface
{

};


If you go to "Implement Virtual Methods..." and implement SomeNamespace::Interface in ImplementationClass, it generates code that doesn't compile because it omits the namespace for the return type:

class ImplementationClass : public SomeNamespace::Interface
{
public:
  virtual TypeInNamespace Method() override
  {
    throw std::logic_error("The method or operation is not implemented.");
  }
};


At first I thought it might be fixed in case=26956, but after re-testing it in build 2094 the issue is still there. Could this please be fixed in future releases? I use the Implement Virtual Methods feature quite a lot, but having to manually add namespaces to every line it generates kind of defeats the purpose.


Build number of Visual Assist: 2094
IDE and version you are using: Visual Studio 2012 update 5, Visual Studio 2015
Programming language(s) in which the problem occurs: C++
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 01 2016 : 12:20:57 PM
I am seeing the same effect here. Thank you for the clear description.

case=69047

Unfortunately I don't currently have an estimate for when this will be looked at, but we are working to improve our support for and handling of namespaces.

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