allow undefined EnvMap enum values for future proofing
@@ -72,5 +72,18 @@ EnvmapAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int
_value = Envmap (tmp);
}
+template <>
+void
+EnvmapAttribute::copyValueFrom (const OPENEXR_IMF_INTERNAL_NAMESPACE::Attribute &other)
+#if defined (__clang__)
+ // _value may be an invalid value, which the clang sanitizer reports
+ // as undefined behavior, even though the value is acceptable in this
+ // context.
+ __attribute__((no_sanitize ("undefined")))
+#endif
+{
+ _value = cast(other).value();
+
+}
OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT
