Boost logo

Boost :

Subject: Re: [boost] [tti] review
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-07-17 16:10:07

On 7/17/2011 1:53 PM, Gordon Woodhull wrote:
> Hi Eddie, Joel, all,
> I apologize that this is a very short review.
> I believe the library should be accepted.

Appreciated !

> The only interesting thing I have to add to the discussion is that a comparison with concepts should be made at least here, and perhaps in the documentation. This library provides functionality that will also be achievable using concepts, e.g. with Matt Calabrese's Generic library.

I do not know the library in question except for a cursory glance.

> I surmise that TTI presents a slightly messier low-level way of figuring out what a type is capable of than concepts and concept-based overloading. So I figure that as usual in such situations, TTI would be more powerful and more concise for checking individual things, and more confusing and verbose for checking the entire interface of a type.
> I think it's good to have both a low-level and an abstract way of doing things. TTI and Generic probably share some techniques and could learn from each other.
> A few superficial comments below.
> I agree with Jeff's suggestion that the matching metafunction should take a metafunction that defaults to is_same rather than always testing for type equality (and now I see why he was also suggesting that in the Type Traits Extension review :).

I will look further into adding this but I strongly feel that I should
not drop the simple functionality currently provided, where the end-user
can just pass an actual type.

> Personally I would use the placeholder expressions and not the metafunction classes, because I find it clearer, unless I really thought it would help with performance.

I feel the same but my original intent with the MTFC macros was to offer
a choice. Since then Jeffrey Hellrung has pointed out to me something I
should have realized earlier, that boost::mpl::quote nicely offers the
functionality of creating a metafunction class from a metafunction in a
generic way, so I intend on dropping the MTFC macros as redundant.

> I think I would prefer a smaller set of more clever macros as Lorenzo was suggesting, but this wouldn't affect my decision to use the library unless there were two that did the same thing.

Simpler yet equally effective is always the ideal, and I am well aware
of it. At the same time I am not as bothered by a large, but sectioned
off and understandable API, as many others are.

> I was alarmed (yes, alarmed! frightened!) by
> template<class)(int> class InnerTemplate
> but IIUC this would only happen without variadic macros, so I don't care. Otherwise it would probably crash my emacs.

I am changing that so that in the non-variadic case a pp-array will be
used and the sort of above syntax will no longer occur.


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