Dynamic dimensions

martin f krafft madduck at debian.org
Sat Mar 28 07:57:49 UTC 2009


also sprach Paul Harris <paulharris at computer.org> [2009.03.28.0854 +0100]:
> So, Willi, would it be possible to adjust your patch so that IF
> the N template parameter is zero, only THEN does it morph kdtree
> into a dynamic-dimensions tree ? ie Ignore the constructor
> parameter unless N=0

I would use template specification here.

> I don't really like that solution either, as it relies on reusing
> N for a different purpose.  What if someone wants to detect errors
> where their program is trying to create a zero-dimension tree
> (possible when users create additional templated layers around
> kdtree).

What about compiler directives: #ifdef ...

-- 
 .''`.   martin f. krafft <madduck at d.o>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
have you drugged your kids today?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/libkdtree-devel/attachments/20090328/22a3b6a6/attachment.pgp 


More information about the libkdtree-devel mailing list