Let C++ always use inline functions (patch)

Jochen Küpper jochen@fhi-berlin.mpg.de
Sun Jun 11 18:59:00 GMT 2006


attached is a patch against current CVS that will always use the
inline-d versions when using a C++ compiler.

It replaces the old test for "HAVE_INLINE" by a test for that macro
/or/ C++:
| -#ifdef HAVE_INLINE
| +#if (defined HAVE_INLINE) || (defined __cplusplus)

This is ok, as a C++ compiler is required by the standard to handle

It helps, because C++ programs then always use the faster inline
versions automatically. 
(C++ programs often don't define HAVE_INLINE at all and it is an
unnecessary burden on the programmer.)

A few Makefiles had to be adopted to link test-binaries against
libgslcomplex.la, this is included in the patch.

It would be great if this could make it into the next release;)

Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
        (Part 3 you find in my messages before fall 2003.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c++-inline.diff
Type: text/x-patch
Size: 36253 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20060611/a8ed5a17/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20060611/a8ed5a17/attachment.sig>

More information about the Gsl-discuss mailing list