<br><br><div class="gmail_quote">2009/3/28 martin f krafft <span dir="ltr">&lt;<a href="mailto:madduck@debian.org">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;">

also sprach Paul Harris &lt;<a href="mailto:paulharris@computer.org">paulharris@computer.org</a>&gt; [2009.03.28.0854 +0100]:<br>
<div class="im">&gt; So, Willi, would it be possible to adjust your patch so that IF<br>
&gt; the N template parameter is zero, only THEN does it morph kdtree<br>
&gt; into a dynamic-dimensions tree ? ie Ignore the constructor<br>
&gt; parameter unless N=0<br>
<br>
</div>I would use template specification here.<br>
<div class="im"></div></blockquote><div><br>You mean an additional template parameter?<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im"><br>
&gt; I don&#39;t really like that solution either, as it relies on reusing<br>
&gt; N for a different purpose.  What if someone wants to detect errors<br>
&gt; where their program is trying to create a zero-dimension tree<br>
&gt; (possible when users create additional templated layers around<br>
&gt; kdtree).<br>
<br>
</div>What about compiler directives: #ifdef ...<br>
<div class="im"><br></div></blockquote></div><br>Not a bad idea, but that excludes those who want a template kdtree and a dynamic-dimensions kdtree.   I may have such a requirement in the future, if I add a feature where the user can choose what data to index and search.   That tree would be dynamic, and the usual trees would be static.<br>

<br>