It's somewhat inconvenient when assigning values to optional attributes to type out the full, templated type. This also causes confusion when assigning those attributes, as it may not be easy to recall for the user which attributes require this extra work.
Allow OptionalValue to be implicitly converted from another value type corresponding to its contained type (e.g., OptionalValue<double> should be able to be constructed by a DoubleValue). Since this requires manual conversions. only cover the common attribute types for these values
It's somewhat inconvenient when assigning values to optional attributes to type out the full, templated type. This also causes confusion when assigning those attributes, as it may not be easy to recall for the user which attributes require this extra work.
Allow
OptionalValue
to be implicitly converted from another value type corresponding to its contained type (e.g.,OptionalValue<double>
should be able to be constructed by aDoubleValue
). Since this requires manual conversions. only cover the common attribute types for these values