|
From: | Dennis G. Faynberg |
Subject: | using-declaration problem |
Date: | Thu, 20 Mar 2003 14:12:20 -0500 |
Hi, I see a strange problem with g++, it does not
recongnize
using-declaration when used to bring an operator into scope. namespace X { using namespace std; string operator+(const string &, long); } void f() { using X::operator+; //this is where g++ tells me //there is a parse error before 'operator'
(std::string)"Number " + 1L + ", take us out"; } what is wrong here, I do not get it. Dennis ps: using using-directive (eg. using namespace X;) is not an option in my real life problem, this is just an example of what essentially happening in real code, if you want to see real code, its posted in this newsgroup (comp.lang.c++) under heading "c++ namespaces, operators and visual c++, g++", but I have not had much success with responses there. |
[Prev in Thread] | Current Thread | [Next in Thread] |