Boost logo

Boost :

Subject: Re: [boost] [type_traits] common_type and SFINAE
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-10-05 01:45:26


On Thu, Oct 4, 2012 at 10:28 AM, 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.

Got it, thanks!

--Lorenzo


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