[geos-devel] Inlining

Mateusz Łoskot mateusz at loskot.net
Mon Apr 10 05:05:26 EDT 2006


strk at refractions.net wrote:
> The rational would be, for a default build, to
> have inlines used by core library, but non-inlined

Why not to use compiler switches to achive this behaviour?

> functions to be available for clients.
> I dunno if there's any standard compiler switch for
> this, but we might reproduce it with the custom mechanism.

I think it's much simplier to use compiler switches instead of custom
mechanism. Here are two that should provide this behaviour:
-fno-inline
-fno-default-inline

> For example, we might have an inline.cpp file including
> all of the .inl files with GEOS_INLINE undefined.
> I haven't tested this yet, though.

If I could comment this approach, I don't like it.
This will scatter code too much, what make maintenance harder.
It'll be hard to navigate, remember which class member is inlined and
which is not, etc.

Cheers

-- 
Mateusz Łoskot
http://mateusz.loskot.net



More information about the geos-devel mailing list