Skip to content

Allow ADL lookup of parse and toStream

Gerhard Raven requested to merge graven/Gaudi:allow-adl-parse-tostream into master

Currently, if one introduces a Gaudi::Property<T>, then there must be a corresponding StatusCode Gaudi::Parsers::parse(T&,const std::string&) in the namespace Gaudi::Parsers and a corresponding void Gaudi::Utils::toStream(const T&, std::stream&) in the namespace Gaudi::Utils.

This patch explicitly enables ADL lookup (with a fall-back to Gaudi::Parser::parse and Gaudi::Utils::toStream) so that it is sufficient to either define parse and toStream in the namespace in which T is defined, or add them as friend functions to T.

Merge request reports