<br><br><div class="gmail_quote">2009/3/28 martin f krafft <span dir="ltr"><<a href="mailto:madduck@debian.org">madduck@debian.org</a>></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 <<a href="mailto:paulharris@computer.org">paulharris@computer.org</a>> [2009.03.28.0854 +0100]:<br>
<div class="im">> So, Willi, would it be possible to adjust your patch so that IF<br>
> the N template parameter is zero, only THEN does it morph kdtree<br>
> into a dynamic-dimensions tree ? ie Ignore the constructor<br>
> 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>
> I don't really like that solution either, as it relies on reusing<br>
> N for a different purpose. What if someone wants to detect errors<br>
> where their program is trying to create a zero-dimension tree<br>
> (possible when users create additional templated layers around<br>
> 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>