[GRASS5] C and C++ compiler changes?
glynn.clements at virgin.net
Wed Oct 22 21:07:49 EDT 2003
Laura Toma wrote:
> Yes, only for C++. It certainly is a pain to maintain C++ with the new
> gcc 3.x, but there's no way around it..It's the price to pay for
> efficient code.
> The main reason r.terraflow is in C++ instead of C is templating.
In that case, some portability issues are probably inevitable.
Templates were one of the last things to be standardised, and one of
the last things to be fixed in gcc.
> functions are templated and the type is determined at runtime,
Er, compile time, right? Or is it using virtual methods?
> the appropriate function to be instantiated. This is more efficient than
> using void* in C, and also saves *a lot* of redundant code.
Is this just for ELEV_SHORT vs ELEV_FLOAT, or is it more extensive
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev