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 1432: namespace problems in member combo
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Nov 22 2005 :  4:52:28 PM  Show Profile
The following code produces wrong entries in the members combo. Functions which exist with different signatures are placed outside the namespace.
#include <string>
#include <vector>

namespace A
{
	namespace B
	{
		namespace C
		{
			class MyClass
			{
			public:
				MyClass(LPCSTR pName, int n=1);
				MyClass(const std::string& name, int n=1);
				~MyClass(void);

				void Name(LPCSTR);
				void Name(const std::string&);
				const std::string& Name() const;

				void Weight(int);
				int Weight() const;

			private:
				std::string		m_szName;
				int			m_nWeight;
			};

			typedef std::vector<MyClass>		vecMyClass;
			typedef vecMyClass::iterator		vecMyClassI;
			typedef vecMyClass::const_iterator	vecMyClassCI;

		} // namespace C
	} // namespace B
} // namespace A


Watch for Name(const std::string&) and the second ctor. They are shown outside the namespaces.

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Nov 23 2005 :  2:24:19 PM  Show Profile
got it. a very easy to reproduce example, thank you!

case=890

zen is the art of being at one with the two'ness
Go to Top of Page
  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