I am trying to port a project in a new Linux system with newer g++ version. While compiling I am getting the following:
error: extra qualification ‘Customer::’ on member ‘getCustomer’
Inside a class definition, I am prefixing getCustomer() with Customer::.
If I remove the Customer:: my code works, however the code has a lot of entries prefixed with class names and scope operator. Is there a way, eg a compiler directive, that helps eliminating this error?
From my shell gcc version 4.4.2 20091027 (Red Hat 4.4.2-7) (GCC)
I’m assuming you mean:
Don’t. There’s no need since you’re already in the class definition, and I don’t think the C++ standard even allows this (I’m surprised older G++ did?).
It seems there’s no
-stdflag (in GCC 4.4.5) that permits this.