Skip to content

Commit f0edce7

Browse files
committed
DOC: Fix copy constructor and assignment operator section.
The copy constructor and assignment operators must be declared in the public section. See discussion in: https://discourse.itk.org/t/itk-disallow-copy-and-assign/648?page=2
1 parent bc14ab9 commit f0edce7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

SoftwareGuide/Latex/DevelopmentGuidelines/WriteAFilter.tex

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,12 @@ \section{Filter Conventions}
521521
\end{minted}
522522

523523
The default constructor should be \code{protected}, and provide sensible
524-
defaults (usually zero) for all parameters. The copy constructor and
525-
assignment operator should be declared \code{private} and not implemented,
526-
to prevent instantiating the filter without the factory methods (above).
524+
defaults (usually zero) for all parameters. The copy constructor and
525+
assignment operator should not implemented in order to prevent instantiating
526+
the filter without the factory methods (above). They should be declared in the
527+
\code{public} section using the \code{ITK\_DISALLOW\_COPY\_AND\_ASSIGN} macro
528+
(see Section~\ref{sec:UsingStandardMacros} on page
529+
\pageref{sec:UsingStandardMacros}).
527530

528531
Finally, the template implementation code (in the \code{.hxx} file) should
529532
be included, bracketed by a test for manual instantiation, thus:

0 commit comments

Comments
 (0)