Haha, I hear poems about the proper ways of coding quite often, sometimes even in rhymes :)

However I cannot change the way my functions are implemented. I work on 14000 c++ files, most of which are 20 years old, and all of which are written like I showed you.

I already wrote my version of proto-impl-toggle in elisp which works pretty good. I can send it to you if you're interested.


On Thu, Oct 31, 2013 at 8:31 PM, David Engster <deng@randomsample.de> wrote:
Vincent Semeria writes:
> Here is the test case.

Thank you. The problem you have is in how you create the scope for your

In the header, you have something like

namespace foo {
  namespace bar {
    class TheClass { int theFunc(); }

Now, since this is C++, there are many ways how to write the definition
for foo::bar::TheClass::theFunc. In your code, you have

using namespace foo;
using namespace bar;

int TheClass::theFunc() { ... }

which, to be frank, I consider to be the worst choice, since this
definition is outside of the two namespaces. It is not clear at all to
which namespace this definition belongs. We would have to search all
namespaces in scope (and the allowed combinations) for a proper
declaration. While this could be implemented in Semantic, it's pretty
tedious, so I don't think someone will implement this soon... :-)

You will see that Semantic will find the implementation if you use

namespace foo {
  namespace bar {
    int TheClass::theFunc() { ... }

or alternatively

int foo::bar::TheClass::theFunc() { ... }

since in both cases the definition has a fully qualified name.

Sorry, but that's the best I can tell you at the moment.