STYLE: move details to MetaDataObjectDetail#4821
STYLE: move details to MetaDataObjectDetail#4821N-Dekker merged 1 commit intoInsightSoftwareConsortium:masterfrom
Conversation
Move meta programming details from unnamed namespace to separate file and header.
There was a problem hiding this comment.
Thanks @blowekamp I believe that the removal of this unnamed namespace from the hxx file is necessary because of the "one definition rule": multiple cxx files may share that same (one) definition of itk::MetaDataObject, whereas an unnamed namespace is different for each cxx file. But I did not ask the guru's 😸
Instead of moving the details to a different .h file, it would also be OK to me to have them in itkMetaDataObject.h or itkMetaDataObject.hxx (as long as they are in the "details" namespace), but your current PR is also fine to me. 👍
Many complications to make this a clear issue template classes, unnamed namespace or local linkage, and only used as constexpr so the symbols may not really exist in the compilation unit.
I may have miss understood what you suggested in parts of #4814. But it's already done, and I followed the model of itkMathDetail.h, and others. We are not too consistent with how these detail name spaces are defined. |
Move meta programming details from unnamed namespace to separate file and header.
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.