Boost logo

Boost :

Subject: Re: [boost] [type_traits] common_type and SFINAE
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2012-10-04 13:34:36

On Thu, Oct 4, 2012 at 1:28 PM, Matt Calabrese <rivorus_at_[hidden]> wrote:

> When the expression isn't valid, then substitution when trying to match
> the specialization fails, meaning it falls back to the default defintiion.
> When the expression is valid, the specialization is a better match because
> the last parameter (void) is an exact match with the template parameters
> that were passed (void was implicitly passed as the default parameter
> because of the original template declaration). It's the same way enable_if
> works only we don't need a boolean condition since we want the
> specialization to be picked for any time the expression is valid,
> regardless of the result type.

I made some enable if macros a while ago to make expresion checks like this
simpler, I'll boostify them and put them up on the sandbox.

-Matt Calabrese

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