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

Sylvain Bougerel sylvain.bougerel.devel at gmail.com
Fri Oct 31 02:32:48 UTC 2008


On Fri, Oct 31, 2008 at 10:21 AM, Paul Harris <paulharris at computer.org> wrote:
>
>>
>> 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).

Oh? I though we copy into another tree, and we only swap at the end...
wait lemme check.

>
>
> 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't be done using automake? since we already have it? Or I'm missing
something about cmake...

>
> can anyone help, or have any tests to contribute?
>
>



More information about the libkdtree-devel mailing list