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

Norbert Thiebaud nthiebaud at gmail.com
Thu Oct 15 12:45:52 PDT 2015


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'

to test that I wrote a little scritp to do a 'naive' compile a dummy
c++ program that include
each and every 'public' include of the project one at the time...

1658 failed out of 2273 -> 72% failure rate


The bulk of the errors are O[U]String[Buffer|Hash] related

The OUString thing can be mitigated by adding some stuff before the include

namespace rtl { class OUString; }
using rtl::OUString;
namespace rtl { class OUStringBuffer; }
using rtl::OUStringBuffer;
namespace rtl { class OString; }
using rtl::OString;
namespace rtl { class OStringBuffer; }
using rtl::OStringBuffer;
namespace rtl { class OUStringHash; }
using rtl::OUStringHash;

that limit the failures to 233 failed or ~ 7%
the bulk of that being related to
"marked 'override' but does not override any member functions"
errors

Norbert


More information about the LibreOffice mailing list