
I have an urgent and definite need for the functionality which boost.units is meant to provide. The concept is quite simple so I had expected it to be relatively easy to use. I had anticipated spending a few hours perusing the documentation and examples, adding code to my application and moving on. T'was not to be. I'm now on day 3 (or 4?) trying to figure this thing out. The main hurdle is that the documentation is indecipherable. There are a number of templated classes defined which depend upon each other. I expect to find a page for each of the templates along with a description of what the template arguments should be. (Ideally these should be backed up with concept checking classes). Ideally there would be a small example showing how one would use these templates. It seems that the library is layered from low level ideas to higher level ones. The documentation touches on this - but its not really formalized. Theres a reference section which includes scores of things like base_units types for wide variety of units - but no where is there any indication how these should be used - not even in the examples are they used. There is a concept of "system" (of dimensions?) and the idea of mixing units from different systems and the idea that the same dimension (eg length) have multiple renderings in the system (nautical vs metric). I realize I've likely got this wrong and I'm not asking for anyone to explain this to me here - my point is that what should be very simple is incredibly confusing. I still haven't figured out whether it's only the documentation which is incomplete or if it is the actual logical design of the library itself is what's flawed. I'm still working on this. I don't remember much traffic on this list regarding this library and if I google information on boost C++ units library I don't get a whole lot of hits. This could mean that that the library is so easy to use no one ever needs to ask about it or it could be that almost no one every uses it. In Boost we don't gather statistics on usage by library so I don't which of these it might be. So my question is: Has anyone had good success with this library? How much effort did it take? What did you have to do to make it work. I would be curious about any other user feed back in these questions. Robert Ramey

Hi Robert, Robert Ramey wrote:
I don't remember much traffic on this list regarding this library and if I google information on boost C++ units library I don't get a whole lot of hits. This could mean that that the library is so easy to use no one ever needs to ask about it or it could be that almost no one every uses it. In Boost we don't gather statistics on usage by library so I don't which of these it might be. So my question is: Has anyone had good success with this library? How much effort did it take? What did you have to do to make it work. I would be curious about any other user feed back in these questions.
I have had good success with the library -- I work on geographical information systems, and it's been great for verifying dimensional correctness. I initially only used the si system, and that didn't take much work at all. I then created my own system, which was extremely difficult. It took a lot of reading of examples and source code before I was able to create a system that met my needs -- then on two occasions I found use cases that couldn't be supported with my system formulation. Each time I read more code and studied the examples and documentation until I found something that worked. I even think my current system is pretty good -- certainly for its application. But my understanding has been hard-won after lots of confusion. (Admittedly, my particular use is complicated by run-time varying behavior and conversions that depend on two dimensions.) I'm coming into boost units from a different angle than many, however -- I wrote my own system based on Abrahams' & Gurtovoy's TMP book, then replaced it with boost.units. I was (and continue to be) impressed with the careful design, and the syntactic convenience it afforded. For me, the difficulty has been transitioning from being a basic user of the library to moving into advanced usage. Unfortunately, I don't have a good idea on how the documentation could be improved for my usage; I'll give it some thought. In short, my experience has been extremely positive, but there have been some stubbed toes while finding my way through the library. Good luck, Nate
participants (2)
-
Nathan Crookston
-
Robert Ramey