Skip to content

Fix compilation with c++23.

Scott Snyder requested to merge ssnyder/Gaudi:cxx23-20220520 into master

The TString header adds the overload: bool operator==(const char *s1, const std::string_view &s2);

This is fine as far as it goes. But c++23 also adds a string_view ctor from a Range, which the implementation qualifies with a requires clause to enforce that the type models a range. The upshot is that if we have a Property p and try to do, say, p != 0, then this will try to instantiate Property::begin(). This will of course fail. So we need to ensure that the begin/end methods of Property are enabled only if the wrapped type is also a range.

Merge request reports