Skip to content

Reduce the visibility of operator<< and several others

Gerhard Raven requested to merge reduce-scope into master
  • Make operator<< and several other functions hidden friends (so that ADL will be able to resolve them) instead of putting them in the global scope. This simplifies the overload resolution for the compiler, and reduces the error messages in case one has code which eg. uses << but for which the right implementation is missing, as the hidden friends will no longer be listed as 'potential candidates which were considered but are not viable', polluting the diagnostic.
Edited by Gerhard Raven

Merge request reports

Loading