[Dune] redundant includes in headers
Jayesh Badwaik
jayesh.badwaik90 at gmail.com
Sat Aug 20 10:27:14 CEST 2011
Hi,
I am no expert on DUNE but I want to say that the policy is a complete
no-brainer.
GCC compilers has this
feature<http://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html>which
makes the concern irrelevant. (Refer to the link)
>From here <http://en.wikipedia.org/wiki/Pragma_once>, I am guessing clang
also has the same feature.
[this feature] :
http://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
[here]: http://en.wikipedia.org/wiki/Pragma_once
Cheers and Regards
Jayesh Vinay Badwaik
Electronics and Communication Engineering
VNIT, Nagpur
INDIA
-----------------------------------------------------------------------------------------------------------------------------------------------
"We are servants rather than masters in mathematics" -- Charles Hermite
On Fri, Aug 19, 2011 at 9:18 PM, Jö Fahlke <jorrit at jorrit.de> wrote:
> Am Fri, 19. Aug 2011, 17:05:47 +0200 schrieb Oleh Krehel:
> > I agree that it's a headache to fix this problem, but it will only
> > grow larger and larger in time. Hopefully it will not become
> unmanageable.
>
> Now you've completely turned around what I said:
>
> 1. I completely disagree in labelling the current situation "a problem".
>
> 2. Only if we do as you say will we actually _create_ a problem.
>
> > As for <fmatrix.hh>, you've misunderstood me:
> > It includes:
> >
> > > #include <cmath>
> > > #include <cstddef>
> > ...
> > then
> > > #include <dune/common/fvector.hh>
> > which itself includes
> > > #include <cmath>
> > > #include <cstddef>.
> > This means that at least the two includes can be safely removed from
> fmatrix.hh.
>
> Well, I understand it exactly the same way this time. I agree with you in
> so
> far that we could remove these to includes from fmatrix.hh, and as long as
> the
> implementation details of fvector.hh don't change then anything using
> fmatrix.hh will continue working correctly.
>
> I probably should emphasize the "as long as the implementation details of
> fvector.hh don't change" part once more. You really don't want to rely on
> implementation details if you can reasonably avoid it.
>
> In my previous mail I gave an example what the negative consequences of
> relying on implementation details can be. Go read it (again).
>
> Bye,
> Jö.
>
> --
> In the beginning the Universe was created. This has made a lot of
> people very angry and been widely regarded as a bad move.
> -- Douglas Adams
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iQIVAwUBTk6Fyemx9CKgc0OWAQhZBhAAmGFaNUPH9MNd5ezyOFGZKV6hEQAn9s3F
> RispZ7bA8AJv0H4lazgdWrkcbaXmjcM1QuArqBRpYFPVp+u3sNCK+UrMuBdPa2tV
> iay49HM9i44ZNfabNXa1zIThmHgHTk2H6U4l25eVP4qpzWET/UuLbV2yMBW+1mEc
> GkTJs2y4kAtxk5eClGOrGHkpDq5mmPZfm6TZDv00QFvAt+YnJzcPu1oXiz7Oqsiz
> AzYVeTs8wPHSd6yXJyM6JOtJf45SVbgFpM1dvYKvTA5abgL1onfD2GRldZZw1jr3
> pCOz8SwrT8nH28x8GfL7KSHHoq2y2bx1E35XkfcFoaEKm20Dc/rpsX59hgwFUo76
> of0AvloR+Xeba1MBcv6K9uvtjdLjVFR3hACtavdigHW6mDlBSlwa8XdaD6CiJlBN
> dqMjrxOdZkeszz8jqusxwrFQIUMW3NKBn9P8bHbh0jn8snEb2T5wutQfWZcgoo0o
> 4oYHgVeT2f0qH1MS4i4rnDDtNHlUHQZakGnTIMqRbO8gXFlL4ykaH27hKedTYhni
> 9upE2MIk2Hf/8WsPRQap0NzXvd1T9CQW5j6p3RBLq2AtFjANNuxTFykrjRNZesOk
> vHAx/fUC7hTR8uNcc6lfM1Hm0Mi9CuUaZiN2yp9EuaaMmCgzi3TZ/q2L5KnM2a0O
> 8QAGXW33GR8=
> =eGWO
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110820/8118f32d/attachment.htm>
More information about the Dune
mailing list