Boost logo

Boost :

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

On Thu, Dec 15, 2011 at 8:26 AM, Lorenzo Caminiti <lorcaminiti_at_[hidden]>wrote:

> I'm asking because Boost.Contract will support both type predicates
> and concepts so I need to tell the users why they can use both, when
> to use concepts, and when to use type predicates. Actually,
> Boost.Parameter also supports both because it can be used together
> with Boost.Concept so IMO it'd be nice to add the same explanation to
> Boost.Parameter as well.

I don't think Boost.Contract nor Boost.Parameter is special in this regard.
The guideline I follow is: use type predicates only to differentiate
between overloads via SFINAE; otherwise, use concept assertions, as they
typically provide more informative error messages and don't complicate the
function signature.

- Jeff

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