This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

g++-3.2.1: parse error before using operator declarative


Hi!

The following IMHO correct code fails to compile with the
whole gcc-3.x line:

> g++ GCCNamespaceBug.C
GCCNamespaceBug.C: In function `int main()':
GCCNamespaceBug.C:9: parse error before `operator'

Code:
------------------------------------------
class C {};

namespace A {
  void operator+(C c1, C c2) {}
}

int main()
{
  using A::operator+;
}
------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]