[geos-devel] assert.h / assert()
Artem Pavlenko
artem at pavlenko.uklinux.net
Tue Jan 31 18:45:54 EST 2006
Stephen,
GEOS is a c++ library, right? Please see [Stroustrup94],[Stroustrup00]
on the topic 'Why to avoid macros when possible'.
Artem
Stephen Woodbridge wrote:
> strk at refractions.net wrote:
>> Is there any known problem in using assert.h with GEOS ?
>> I'm asking as I know there have been issues with stdio.h
>> in the past, but I'd like to be able using assert()
>> or any equivalent standard C++ thing to easy debugging.
>
> Why not wrap is in a #define like
>
> #ifdef DEBUG
> #define ASSERT(x) assert(x)
> #else
> #define ASSERT(x)
> #endif
>
> or something like that. Then it is easy to add it to the source but
> exclude when required.
>
> -Steve W.
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel
>
>
More information about the geos-devel
mailing list