ENH: Support C-style arrays as MetaDataObjectType for MetaDataDictionary#3320
Conversation
Allows passing a N-dimensional C-style array as value, when calling `itk::EncapsulateMetaData(dictionary, key, value)`.
b828da6 to
8ceb12d
Compare
|
FYI: This force-push only adjusted the unit test and the commit text, not the actual implementation. |
|
/AZP run ITK.Windows |
|
|
||
| /** `Assign` overload for C-style arrays (as well as arrays of arrays). */ | ||
| template <typename TValue, size_t VNumberOfElements> | ||
| static void |
There was a problem hiding this comment.
Should / can this return a reference to the left hand side?
There was a problem hiding this comment.
@Leengit Thanks for asking. The Assign overload for C-style arrays might indeed return a reference to the left hand side, but I would not say it should. Because it isn't really necessary. Note that it is just an internal private member function (template). Technically, it is not a template specialization of the other Assign(target, source), it is just an overload. (If it would have been a template specialization, it would be required to have the same return type as the generic function template. But that's not the case here.)
Allows passing a N-dimensional C-style array as value, when calling
itk::EncapsulateMetaData(dictionary, key, value).