Boost logo

Boost :

Subject: Re: [boost] [type_traits] common_type and SFINAE
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2012-10-04 03:46:47


On Thu, Oct 4, 2012 at 3:28 AM, Lorenzo Caminiti <lorcaminiti_at_[hidden]>wrote:

> An alternative design (I'm not sure if implementable) would have been
> to not define the type member in case T and U have no common type.
> This way I could use SFINAE to detect if common_type<T, U>::type does
> not exist and therefore if T and U have not common type -- so to
> implement N3351's concept Common<T, U>.
>
> Is there a way to implement this alternative design?
>

Yes, here you go:

http://codepaste.net/xom5rd

-- 
-Matt Calabrese

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