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
 No exact type-resolution of "Implement methods"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

andre.horst
Tomato Guru

Germany
150 Posts

Posted - Aug 30 2012 :  04:08:14 AM  Show Profile  Reply with Quote
Latest VAX, Win7, VC2008

Consider following example:

namespace a
{
	class CInterface
	{
	public:
		enum enFoo{};
		virtual void Foo( const enFoo ) = 0 ;
	} ;
}

namespace b
{
	class CImpl: public a::CInte[Implement Method]rface
	{
	public:
		virtual void Foo( const enFoo ) // Qualifier missing for enum
		{
			throw std::exception("The method or operation is not implemented.");
		}
	} ;
}

The enum type resolution is missing a namespace qualifier.

feline
Whole Tomato Software

United Kingdom
19147 Posts

Posted - Aug 30 2012 :  2:38:35 PM  Show Profile  Reply with Quote
I am seeing the same effect here, but this code is compiling just fine for me in VS2008, which was a surprise to me. Does this compile for you?

zen is the art of being at one with the two'ness
Go to Top of Page

andre.horst
Tomato Guru

Germany
150 Posts

Posted - Sep 03 2012 :  01:37:20 AM  Show Profile  Reply with Quote
Ok, this example was not so smart... The enum is inherited so it is known.

Add an other enum just to the namespace "a" and add a parameter with this enum to the "CInterface::Foo" method. Than "Implement Interface" again in the "CImpl" class. Now the namespace qualifier is missing.

Btw: Did not tried typedefs or other classes in different namespaces as parameters, but I think this would make some trouble too. Also did not tried return-types.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 03 2012 :  12:32:02 PM  Show Profile  Reply with Quote
Thank you for the additional information. I was able to reproduce the problem via moving the enum out of the class, directly into the namespace:

case=69047
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