Boost logo

Boost :

Subject: Re: [boost] [review][constrained_value] Review of Constrained Value Library begins today
From: John Maddock (john_at_[hidden])
Date: 2008-12-03 12:32:05

OK here we go with my review.

First off, I do think the library should be accepted into Boost (modulo
comments below), and I'd like to congratulate Robert on a very nicely
presented submission.

> - What is your evaluation of the design?

It looks good to me, however, I'm probably not a potential user of the
library, but the design "looks right" based on reading the docs.

> - What is your evaluation of the implementation?

Only a quick glance at the source, and a bit of time stepping through the
some examples, but all the bases seem to be covered.

However, I did notice that the empty-base-optimisation has been incorrectly
applied - so for example sizeof(bounded_int<int, 0, 100>::type) is 8 when
compiled with msvc (ie even with EBO support).

I believe you would need to use something like:

compressed_pair<compressed_pair<int, policy1>, policy2>

as the single data member to completely optimise away the overhead when both
policies are empty (the usual case).

Also I'm a little surprised that there are no tests as yet: rather lets down
an otherwise nice submission.

**** I believe the review manager should not allow full acceptance until a
decent set of tests are provided ****

> - What is your evaluation of the documentation?

Overall very good, with a nice tutorial that's really all you need to read
to get started.

But... no documentation on the concepts used by the library, and of course
suitable concept archetypes should be used to test the library.

> - What is your evaluation of the potential usefulness of the library?

Hard to say, but I suspect quite useful for certain domains.

I believe the usefullness would be increased if it supported bounded
floating point values - I believe the rationale for not supporting this
(arguments to assignment may change due to rounding when stored) can be
overcome - but would require careful testing.

> - Did you try to use the library? With what compiler? Did you have any

Just a quick test with msvc, had there been a set of tests I would have run
them with more compilers...

> - How much effort did you put into your evaluation? A glance? A quick
reading? In-depth study?

A couple of hours reading docs, browsing source, and building a couple of

> - Are you knowledgeable about the problem domain?

Not especially :-(


Boost list run by bdawes at, gregod at, cpdaniel at, john at