This issue is a follow-up of a previous post of mine. In the first part of that thread I describe how an enum class inside a namespace is not available in the root shell, even after loading its dictionary, and the only way to make it available is to load the rootmap (e.g starting the shell from the folder where the dictionary library and the rootmap are) or manually load the header where the enum class is defined.
I’m still facing the same issue with a modern Root version so I wonder whether this is intended behavior or a bug (and eventually if it is going to be fixed).
Thanks.
The interpreter tries really hard to not parse headers - that’s costly, so it tries to find information elsewhere. Please add #pragma link C++ namespace NS; to make the namespace known to ROOT.
Hi Axel, honestly I lost track of the storing issue. We worked that around a few time ago, so I have to check from scratch; will do that in a while and report back directly on JIRA.
About the pragma, that doesn’t seem to help at all. It is already present in the reproducer attached to the original thread, but it does not fix this issue.
@Axel I tried the reproducer with Root commit 22a84ec3fceb from your dict-fwd-decl-ns-td-enum branch. I confirm that it fixes the issue almost completely, the only leftover being that double tab does not work (i.e. root[0] NS:: <tab> <tab> does not autocomplete nor shows a list of available names in the namespace as it does when the rootmap file is loaded).