Menu

Namespace separation of symbols

Help
2016-09-02
2016-09-08
  • Jason Smith

    Jason Smith - 2016-09-02

    First off, fabulous project, thank you.

    I am having an issue with symbols defined in different namespaces, clashing. For instance:

    namespace A {
    class X;
    };

    namespace B {
    class X;
    };

    A::X is not 'registered' as a fully qualified name in _CppHeader.classes. Hitting B::X in _CppHeader.evaulate_class_stack triggers a name collision error.

    Happy to work with you on this, as I've been fixing bugs as I find them in my local 'fork' (I needed to implement a rudimentary preprocessor directive handler for our own needs, that I don't think would be of interest to most), but this one looked to require some more pervasive edits than I am ready to jump into. (I would hope that just fully qualifying the symbol names would be sufficient, but it didn't seem to be quite that simple.)

     
  • Jashua Cloutier

    Jashua Cloutier - 2016-09-06

    I'll have to think about how to do this one. Please open a bug. I fear the fix may be to store names as "A::X" rather than "X" where the namespace is A as an attribute. But there may be backwards incompatibility for some... something to think about.

     
  • Jason Smith

    Jason Smith - 2016-09-08

    Bug #64 opened. Thank you. I think the obvious fix is likely to succeed, but I wanted a more experienced noodling over it before diving in.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.