Closed N-Dekker closed 1 month ago
@thewtex FYI, I think this pull request can be merged safely for ITK 5.4. On the other hand, it isn't very urgent to me, personally. It might become urgent, once compilers start to complain about using size_t
without specifying the namespace std
.
This looks like a low-risk addition, and merging it sooner rather than later is better in my opinion.
This does seem to be low risk; however, it is also possible to cause issues since there may be naming conflicts. Since this is not addressing a known issue, it should be merged after v5.4.0.
@thewtex OK, no problem. Marked "draft"to avoid accidentally being merged before the release of v5.4.0. 👍
I think this pull request may also be merged now, as v5.4.0 has been tagged: https://github.com/InsightSoftwareConsortium/ITK/pull/4603#issuecomment-2120498131
Officially, we may not assume that
ptrdiff_t
andsize_t
are defined in the global namespace.Motivation: Both
ptrdiff_t
andsize_t
are already commonly being used inside theitk
namespace, without specifying theirstd
namespace:https://github.com/InsightSoftwareConsortium/ITK/blob/487da6d086b341808147c71e8dd1eb1f57371ea6/Modules/IO/ImageBase/include/itkConvertPixelBuffer.h#L64
https://github.com/InsightSoftwareConsortium/ITK/blob/487da6d086b341808147c71e8dd1eb1f57371ea6/Modules/Video/IO/src/itkFileListVideoIO.cxx#L64
It just compiles, so far! However, compilers may become more picky, as those types are not guaranteed to remain available in the global namespace.