Boost logo

Boost :

Subject: [boost] RE [Boost-announce] [Review] Boost.Type Traits Extension by Frederic Bron
From: vijayan (vijayan121_at_[hidden])
Date: 2011-03-14 05:58:58


> What is your evaluation of the design?

Overall it is fine. However, I have two suggestions you may want to consider:

a. For the assignment operators (for example +=) the name proposed is
of the form has_operator_<op>_equal (for example
has_operator_plus_equal). Wouldn't has_operator_<op>_assign (for
example has_operator_plus_assign) be more intuitive?

b. From the documentation: There is an issue if the operator exists
only for type A and B is convertible to A. In this case, the compiler
will report an ambiguous overload.
Couldn't this be mitigated by changing the default for the result type
from void to the type as in <functional>?
For example:
has_operator_unary_minus < class RHS, class RET=RHS >
has_operator_minus_assign < class LHS, class RHS=LHS, class RET=LHS >

This would take care of most of the normal use cases.

> What is your evaluation of the implementation?
Good that it is a 'header only' extension.

> What is your evaluation of the documentation?
Has all that is required. One can start using the library after a few
minutes of looking at the documentation.

> What is your evaluation of the potential usefulness of the library?
Very useful, on those (AFAIK somewhat rare) occasions when it is required.

> Did you try to use the library? With what compiler? Did you have any problems?
Briefly used it with g++ 4.5.0 on both FreeBSD and Linux. Tested only
a few Operator Type Traits, and had no problems whatsoever.

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

> Are you knowledgeable about the problem domain?
Not really. I'm just a journeyman programmer who has found the Type
Traits library useful in the past.

> Do you think the library should be accepted as a Boost library?
YES.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk