Beman/Boost-Btree — pull request #1 by tzlaine (2013-03-12 19:39:52+00:00)
Title: Changes to allow larger value types, and a larger number of nodes.

Hi, Beman. It's Zach Laine from BoostCon. I have been getting great use out of Boost.Btree at my new job. I'm using it to page large quantities of terrain for a 3D terrain renderer. I've made some modifications to Boost.Btree in the process. The commits are intentionally made in least- to most-controversial order (for example, the first one fixes a link error).

The overall nature of the changes was to allow the representation of larger value types which are well over 64kb (e.g. 512x512 tiles of 3-byte pixels). Whereas Boost.Btree seems to be oriented around large collections of small values, we have need for large collections or large values.

Also, there is a commit in there that throw when you attempt to load from a btree whose value and/or mapped types are not the size you expect. I needed this in order to make it easier to work with data at multiple levels of detail (LOD). I may represent the same geographical region with a 512x512 tile, a 256x256 tile, a 128x128 tile, etc. Being able to rely on an exception being thrown when I tried to load the wrong size tile was very useful.

The last commit does rollback on an open() when the exception above is thrown. This also made my particular case easier to manage.

I hope you'll accept all these changes, but will understand if you don't. The most critical ones for my use case are the ones at or before c9566b1c2db9b37a2c885a3a7d216775cc76a529.

Thanks in advance,

Zach