Boost logo

Boost :

Subject: Re: [boost] [type_traits] common_type and SFINAE
From: Andrew Sutton (asutton.list_at_[hidden])
Date: 2012-10-05 19:59:07


> common_type<T, U>::type is defined in a way that gives a hard compiler
> error if T and U do not have a common type (this is also how
> common_type is implemented in C++11).

Sorry. This discussion slipped under my radar. I had to do this too.
Implementation is here, starting around line 380:

http://code.google.com/p/origin/source/browse/trunk/origin/type/traits.hpp

I used this library to test the concepts we wrote in n3351, although
that specific work was moved to a branch or the sandbox a while ago. I
forget.

Andrew


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