Boost logo

Boost :

Subject: Re: [boost] [parameter] type predicates vs. concepts
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-12-04 17:42:35

On Sun, Dec 4, 2011 at 10:23 AM, Lorenzo Caminiti <lorcaminiti_at_[hidden]>wrote:

> Hello all,
> What's the difference between using a Boost.Parameter type predicate
> and using a concept?
> I think parameter type predicates are unary metafunctions used to
> resolve the function call, concepts are asserted on the type after the
> call has been resolved... Is there more? Can I always do with type
> predicates what I can do with concepts? Is there ever a reason to
> use/need both?

I'd imagine some concepts checking classes cannot be translated into a
strictly equivalent metafunction, especially for C++03.

Also, the error message typically generated for a failed Boost.Concept
assertion might be more desirable than that for a failing to find a
compatible overload due to the use of SFINAE and metafunctions.

- Jeff

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