[petsc-dev] declaring argument as const basic type in PETSc
Jed Brown
jedbrown at mcs.anl.gov
Wed Aug 17 14:32:09 CDT 2011
On Wed, Aug 17, 2011 at 12:29, Chetan Jhurani <chetan.jhurani at gmail.com>wrote:
> can be avoided by putting const int in declaration
> as well.
>
Right, but doing this is nonsense because it puts implementation details in
a public header, the "anti-encapsulation". Just don't use const for value
parameters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110817/10718669/attachment.html>
More information about the petsc-dev
mailing list