Skip to content

Make Gaudi::Property<T> work even if T is only copy-constructible

Right now, the Gaudi::Property<T> code assumes that the type T is default-constructible. But it only uses this assumption when a value of type T is parsed from a string. With a couple of modifications to the string parsing function, Gaudi::Property can work with copy-constructible types as well.

@graven Is there a simpler way to have one implementation of fromString for default-constructible types, which takes priority, and another for copy-constructible types which is used as a fallback? Or is this code as simple as it can get?

Edited by Hadrien Benjamin Grasland

Merge request reports