From 87caaacacf979ae15818dce2db903f38730db453 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 1 Apr 2024 17:51:10 -0400 Subject: [PATCH] COMP: Add compiler deduction guides RLEImage ImageScanlineConstIterator This addresses https://github.com/InsightSoftwareConsortium/ITK/issues/4537 In addition to SmartPointer arguments, we need a raw const pointer version. Suggested-by: Niels Dekker --- include/itkRLEImageScanlineConstIterator.h | 10 ++++++++++ include/itkRLEImageScanlineIterator.h | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/include/itkRLEImageScanlineConstIterator.h b/include/itkRLEImageScanlineConstIterator.h index 20b8016..3ed266c 100644 --- a/include/itkRLEImageScanlineConstIterator.h +++ b/include/itkRLEImageScanlineConstIterator.h @@ -178,6 +178,16 @@ class ImageScanlineConstIterator> return *this; } }; + +// Deduction guide for class template argument deduction (CTAD). +template +ImageScanlineConstIterator(SmartPointer>, const typename RLEImage::RegionType &) + ->ImageScanlineConstIterator>; + +template +ImageScanlineConstIterator(const RLEImage *, const typename RLEImage::RegionType &) + ->ImageScanlineConstIterator>; + } // end namespace itk #endif // itkRLEImageScanlineConstIterator_h diff --git a/include/itkRLEImageScanlineIterator.h b/include/itkRLEImageScanlineIterator.h index 68dca6e..a7662e9 100644 --- a/include/itkRLEImageScanlineIterator.h +++ b/include/itkRLEImageScanlineIterator.h @@ -102,6 +102,12 @@ class ImageScanlineIterator> return *this; } }; + +// Deduction guide for class template argument deduction (CTAD). +template +ImageScanlineIterator(SmartPointer>, const typename RLEImage::RegionType &) + ->ImageScanlineIterator>; + } // end namespace itk #endif // itkRLEImageScanlineIterator_h