Click here to Skip to main content
15,912,082 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: TCP client/server data exchange Pin
Mark Salsbery15-Nov-07 7:10
Mark Salsbery15-Nov-07 7:10 
GeneralRe: TCP client/server data exchange Pin
JudyL_MD15-Nov-07 7:25
JudyL_MD15-Nov-07 7:25 
GeneralRe: TCP client/server data exchange Pin
Mark Salsbery15-Nov-07 7:36
Mark Salsbery15-Nov-07 7:36 
GeneralRe: TCP client/server data exchange Pin
Mark Salsbery15-Nov-07 7:14
Mark Salsbery15-Nov-07 7:14 
GeneralRe: TCP client/server data exchange Pin
JudyL_MD15-Nov-07 7:27
JudyL_MD15-Nov-07 7:27 
GeneralRe: TCP client/server data exchange Pin
Mark Salsbery15-Nov-07 7:36
Mark Salsbery15-Nov-07 7:36 
GeneralRe: TCP client/server data exchange Pin
JudyL_MD15-Nov-07 2:59
JudyL_MD15-Nov-07 2:59 
QuestionWeird namespace alias resolution problem in VC++ 2003 Pin
Orhun Birsoy14-Nov-07 8:42
Orhun Birsoy14-Nov-07 8:42 
I have encountered a weird namespace alias resolution bug(?) in VC++ 2003. I'm getting error C2653: 'innernamespace' : is not a class or namespace name for Orhun::Func2 (Commented out in the code provided below). Note that Func3, which is not a class method, with similar signature compiles just fine...
VC++ 2005 compiles all 3 functions without any errors.
Is this a known problem with 2003? My searches failed to return any meaningful results.

namespace topnamespace
{
	namespace innernamespace
	{
		class Foo
		{
		public:
			Foo() {}
			Foo(int i) {}
		};
	}
}

namespace orh = topnamespace::innernamespace;

class Orhun
{
	// This works.
	void Func1(orh::Foo e = topnamespace::innernamespace::Foo(-1))
	{
	}

	// This does not work. Fails at the default parameter namespace alias resolution.
	// As can be seen from Func1, namespace alias resolution works for the parameter itsself.
	// Strangely enough Func3 below compiles just fine...
 	// void Func2(orh::Foo e = orh::Foo(-1))
 	//{
 	//}
//namespacealias.cpp(31) : error C2653: 'innernamespace' : is not a class or namespace name
//namespacealias.cpp(31) : error C3861: 'Foo': identifier not found, even with argument-dependent lookup
};

// This works
void
Func3(orh::Foo e = orh::Foo(-1))
{}


Orhun Birsoy

AnswerRe: Weird namespace alias resolution problem in VC++ 2003 Pin
Mark Salsbery14-Nov-07 9:30
Mark Salsbery14-Nov-07 9:30 
AnswerRe: Weird namespace alias resolution problem in VC++ 2003 [modified] Pin
snowfall114-Nov-07 16:39
snowfall114-Nov-07 16:39 
QuestionAppoint help: [modified] Pin
Hakan Bulut14-Nov-07 6:37
Hakan Bulut14-Nov-07 6:37 
AnswerRe: Appoint help: Pin
Janzen14-Nov-07 7:14
Janzen14-Nov-07 7:14 
GeneralRe: Appoint help: Pin
Hakan Bulut14-Nov-07 7:34
Hakan Bulut14-Nov-07 7:34 
GeneralRe: Appoint help: Pin
led mike14-Nov-07 7:48
led mike14-Nov-07 7:48 
GeneralRe: Appoint help: Pin
Mark Salsbery14-Nov-07 8:02
Mark Salsbery14-Nov-07 8:02 
GeneralRe: Appoint help: Pin
Hakan Bulut14-Nov-07 8:05
Hakan Bulut14-Nov-07 8:05 
GeneralRe: Appoint help: Pin
led mike14-Nov-07 8:51
led mike14-Nov-07 8:51 
GeneralRe: Appoint help: Pin
Hakan Bulut15-Nov-07 5:39
Hakan Bulut15-Nov-07 5:39 
AnswerRe: Appoint help: Pin
Mark Salsbery14-Nov-07 7:32
Mark Salsbery14-Nov-07 7:32 
GeneralRe: Appoint help: [modified] Pin
Hakan Bulut14-Nov-07 7:47
Hakan Bulut14-Nov-07 7:47 
GeneralRe: Appoint help: Pin
Mark Salsbery14-Nov-07 8:01
Mark Salsbery14-Nov-07 8:01 
Question.PCH size slowing compilation? Pin
hairy_hats14-Nov-07 6:25
hairy_hats14-Nov-07 6:25 
AnswerRe: .PCH size slowing compilation? Pin
toxcct14-Nov-07 6:28
toxcct14-Nov-07 6:28 
QuestionAsynchronous overlapped I/O Pin
racette14-Nov-07 5:07
racette14-Nov-07 5:07 
AnswerRe: Asynchronous overlapped I/O Pin
led mike14-Nov-07 5:21
led mike14-Nov-07 5:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.