The cpp-generic-toolbox/include/GenericToolbox.Root.h file contains:
#if ROOT_VERSION_CODE >= ROOT_VERSION(6,28,04)
return gDirectory.fValue->load();
#elif ROOT_VERSION_CODE >= ROOT_VERSION(6,23,02)
return gDirectory.fValue.load();
#else
I do not know which ROOT versions allow "gDirectory.fValue.load()" but the "operator->" is also needed for "ROOT_VERSION(6,26,14)" (I do not have here any previous ROOT versions to test it further, sorry).