(resent) sorry had to compress the patch, the original email is stuck in the moderator&#39;s queue...<br><div class="gmail_quote"><br><br>Hi all,<br><br>I&#39;ll continue this email thread... attached is a smallish patch (I&#39;m not familiar with git so I started smallish).&nbsp; It removes all the method specifiers that say throw()... eg<br>
<br>void do_something throw() { }<br>
<br>The throw() things are not desirable as kdtree should be exception transparent... the throw()s caused problems with my program, as sometimes accessors could throw an exception - and the no-throw guarantee that kdtree was imposing prevented it from compiling.<br>

<br>I also had trouble compiling kdtree for a visual c++ 2005 program, because (IIRC) of the use of GCC&#39;s __throw_exception_again extension.<br><br>Instead, I switched to a class-destructor pattern (I forget the patterns name) which basically uses a class to manage the lifetime of the pointer...<br>

<br>_Link_type _M_new_node( etc)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typename _Base::NoLeakAlloc noleak(this);&nbsp; &lt;-- see allocator.hpp for definition. this allocs memory<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _Link_type new_node = noleak.get();&nbsp;&nbsp; &lt;-- just get the pointer from noleak<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _M_construct_node(new_node, __V, __PARENT, __LEFT, __RIGHT);&nbsp; &lt;-- do the thing that could throw an exception<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; noleak.disconnect();&nbsp; &lt;--- if we are here, then all went well. call this function that stops noleak from deallocating on destruction<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return new_node;<br>}<br><br>else if construct_node threw an exception, noleak&#39;s destructor would automatically dealloc the node.<br><br><br><br>I also extended the &#39;examples&#39; Makefile so it&#39;ll try compiling it with gcc 3.4, 4.2 and 4.3 (run make all_gcc). I corrected a minor problem in the test file (missing include file).<br>

<br><br>Note that I have a bunch more changes to work through, but I need to merge the changes from the trunk into mine first... so I thought I&#39;d start with this throw() task.&nbsp; BUT that means I haven&#39;t tested out kdtree on my application, so if people could please test out this patch, reject or accept it, that would be great.<br>

<br>cheers<br>Paul<br><br><br><div class="gmail_quote">2008/10/26 Paul Harris <span dir="ltr">&lt;<a href="mailto:paulharris@computer.org" target="_blank">paulharris@computer.org</a>&gt;</span><div><div></div><div class="Wj3C7c">
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I agree, it is time to revise naming.&nbsp; I did some revision on my local version but with less underscores.<br><br>I suggest we make small changes (such as this patch) to libkdtree for debian&#39;s release packaging for the moment since Lenny needs to stablise very soon, and I&#39;ll see if we can get the ball rolling on merging in bigger changes for 0.7.0<br>


<br>I&#39;ll have a quick look now to see if there are any other small changes from my local version that I can bring in to <a href="http://0.6.3." target="_blank">0.6.3.</a>..<br><br><div class="gmail_quote">2008/10/25 martin f krafft <span dir="ltr">&lt;<a href="mailto:madduck@debian.org" target="_blank">madduck@debian.org</a>&gt;</span><br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>also sprach Martin SCHREIBER &lt;<a href="mailto:martin.schreiber@in.tum.de" target="_blank">martin.schreiber@in.tum.de</a>&gt; [2008.10.25.0404 +0200]:<br>



<div>&gt; is it possible that you patch the git sources and create a new<br>
&gt; version 0.6.3?<br>
<br>
</div>Even though the patch might well work, it strikes me as hackish.<br>
Maybe it&#39;s time to revise the naming completely?<br>
<br>
Cheers,<br>
<br>
--<br>
&nbsp;.&#39;&#39;`. &nbsp; martin f. krafft &lt;<a href="mailto:madduck@debian.org" target="_blank">madduck@debian.org</a>&gt;<br>
: :&#39; &nbsp;: &nbsp;proud Debian developer, author, administrator, and user<br>
`. `&#39;` &nbsp; <a href="http://people.debian.org/%7Emadduck" target="_blank">http://people.debian.org/~madduck</a> - <a href="http://debiansystem.info" target="_blank">http://debiansystem.info</a><br>
 &nbsp;`- &nbsp;Debian - when you have better things to do than fixing systems<br>
<br>
in africa some of the native tribes have a custom of beating the<br>
ground with clubs and uttering spine chilling cries. anthropologists<br>
call this a form of primitive self-expression. in america they call<br>
it golf.<br>
<br></div></div>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
<br>
iEYEARECAAYFAkkC9boACgkQIgvIgzMMSnVUTgCghHcFfomXpiBsUyCOLFKFvNVc<br>
/BEAn1PVy1F2qgXqYQanTpn+VCPBBSt2<br>
=DBLS<br>
-----END PGP SIGNATURE-----<br>
<br>_______________________________________________<br>
libkdtree-devel mailing list<br>
<a href="mailto:libkdtree-devel@lists.alioth.debian.org" target="_blank">libkdtree-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel</a><br>
<br></blockquote></div><br>
</blockquote></div></div></div><br>
</div><br>