can include really compile in any order ? let's see

Miklos Vajna vmiklos at collabora.co.uk
Fri Oct 16 03:20:54 PDT 2015


Hi Norbert,

On Thu, Oct 15, 2015 at 02:45:52PM -0500, Norbert Thiebaud <nthiebaud at gmail.com> wrote:
> So, following the ESC call, I wondered how true is the stated goal
> that include should be self contained.. iow that you can include any
> of them in whaever order and it should 'work'

I think that idea comes from the following concept: if each class has a
class.hxx for its interface and a class.cxx for its implementation, then
in case class.cxx includes class.hxx as its first include, we get
compile-time verification that the header is self-contained.

An other problem is when a header includes an other header without a
good reason, but we fear to remove that, as adjusting clients would be a
considerable amount of work. See e.g.
6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 for sal/log.hxx and the string
classes.

In any case, thanks for the experiment, now we have numbers that also
say that the current situation is sub-optimal. ;-)

Regards,

Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20151016/145fa819/attachment.sig>


More information about the LibreOffice mailing list