You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The definition of gDirectory as a macro causes problems when used inside of a namespace named ROOT.
For example, the following fails to compile with GCC 9.3 and C++17:
#include"TDirectory.h"namespaceutil::ROOT {
voidfoo() { auto path = gDirectory->GetPath(); }
}
Because gDirectory expands to ROOT::Internal... and not ::ROOT::Internal..., C++ name lookup chooses util::ROOT and notices that util::ROOT::Internal is non-existent.
Expected behavior
The above should compile without ambiguity. A PR is forthcoming to address this limitation.
Setup
Version: ROOT 6.26/06
Operating system: CentOS 7
Built from source
The text was updated successfully, but these errors were encountered:
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Describe the bug
The definition of
gDirectory
as a macro causes problems when used inside of a namespace namedROOT
.For example, the following fails to compile with GCC 9.3 and C++17:
Because
gDirectory
expands toROOT::Internal...
and not::ROOT::Internal...
, C++ name lookup choosesutil::ROOT
and notices thatutil::ROOT::Internal
is non-existent.Expected behavior
The above should compile without ambiguity. A PR is forthcoming to address this limitation.
Setup
The text was updated successfully, but these errors were encountered: