[Libreoffice] compile-time trickery to detect misuse of SAL_N_ELEMENTS, RTL_CONSTASCII_USTRINGPARAM, etc.

2010-11-12 Thread Caolán McNamara
On Tue, 2010-11-02 at 14:26 +, Caolán McNamara wrote: > On Mon, 2010-11-01 at 20:56 +0200, Jani Monoses wrote: > > Is there a list of which compilers are supported and what versions > > recommeneded for building LO? > > > > I was thinking of the feasibility of using gcc's __builtin_constant_p

Re: [Libreoffice] compile-time trickery to detect misuse of SAL_N_ELEMENTS, RTL_CONSTASCII_USTRINGPARAM, etc.

2010-11-12 Thread Thorsten Behrens
Caolan McNamara wrote: > So, with a bit more poking around I discovered the template trick to > force a compile time error if the argument is not an array, and to > calculate at compile time the length of the array. > Clever hack! :) Along those lines, any reason not to use boost in sal / udk? I'

Re: [Libreoffice] compile-time trickery to detect misuse of SAL_N_ELEMENTS, RTL_CONSTASCII_USTRINGPARAM, etc.

2010-11-13 Thread Caolán McNamara
On Sat, 2010-11-13 at 00:19 +0100, Thorsten Behrens wrote: > Caolan McNamara wrote: > > So, with a bit more poking around I discovered the template trick to > > force a compile time error if the argument is not an array, and to > > calculate at compile time the length of the array. > > > Clever ha

Re: [Libreoffice] compile-time trickery to detect misuse of SAL_N_ELEMENTS, RTL_CONSTASCII_USTRINGPARAM, etc.

2010-11-13 Thread Thorsten Behrens
Caolan McNamara wrote: > Was there a policy against using boost in sal/cppu/etc ? > I somehow forgot the rationale, but yeah: http://www.openoffice.org/servlets/ReadMsg?list=interface-discuss&msgNo=869 -- Thorsten pgpCyQLOPmvfW.pgp Description: PGP signature ___

Re: [Libreoffice] compile-time trickery to detect misuse of SAL_N_ELEMENTS, RTL_CONSTASCII_USTRINGPARAM, etc.

2010-11-14 Thread Caolán McNamara
On Sun, 2010-11-14 at 00:53 +0100, Thorsten Behrens wrote: > Caolan McNamara wrote: > > Was there a policy against using boost in sal/cppu/etc ? > > > I somehow forgot the rationale, but yeah: > > http://www.openoffice.org/servlets/ReadMsg?list=interface-discuss&msgNo=869 Unless I'm failing to s

Re: [Libreoffice] compile-time trickery to detect misuse of SAL_N_ELEMENTS, RTL_CONSTASCII_USTRINGPARAM, etc.

2010-11-15 Thread Michael Meeks
On Sun, 2010-11-14 at 20:21 +, Caolán McNamara wrote: > Unless I'm failing to see the obvious I wouldn't have a problem with > using boost in sal and friends, assuming we stick to the vast majority > of boost that don't require linking against specific boost libs. Sounds reasonable to

Re: [Libreoffice] compile-time trickery to detect misuse of SAL_N_ELEMENTS, RTL_CONSTASCII_USTRINGPARAM, etc.

2010-11-15 Thread Thorsten Behrens
Michael Meeks wrote: > Does that mean we should use some of the boost system abstractions > instead of our own home-brewed ones where appropriate - perhaps ;-) - is > that what underlies the question ? clearly if they perform better it'd > be lovely - is there some low-hanging fruit here ? I