patch to make libkdtree compatible with g++-4.2 and g++-4.3

Paul Harris paulharris at computer.org
Fri Oct 31 02:21:58 UTC 2008


>
> Hey, and they also talk about exceptions (cool)...
>
> http://www.boost.org/development/requirements.html#Exception-specification
>
> ...and made me realize I was completely wrong about the good and bad
> of exception-specification when it comes to performance.
>
> So I go on to the second point. I also completely agree to remove all
> the exception-specifications from the library :)
>

i think for us, the key thing is to ensure that if *any* call will throw an
exception, then our library is not left in an inconsistent state.   one
place is in the create-new-node, which should be ok.

we should also ensure that optimise() is not able to leave the tree in an
inconsistent state (or if it is, it should be obvious to user that the tree
is now hosed).

optimise() could throw if the user's datatype's accessor threw an
exception...  then one of the comparisons while building the tree may throw
us out half way through an optimise.  if we design it right, even if an
exception is thrown, the tree would still be in a consistent state (although
not balanced).


it would be nice to get lots of tests written up before making more
changes.  i am currently using cmake for another project, i think i'll have
a go at adding cmake support for kdtree, and i'll see if i can add in ctest
too (i haven't tried it out yet).

can anyone help, or have any tests to contribute?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/libkdtree-devel/attachments/20081031/2b269121/attachment.htm 


More information about the libkdtree-devel mailing list