This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] Another try at LWG 2141


2012/10/24 Marc Glisse <marc.glisse@inria.fr>:
> On Wed, 24 Oct 2012, Paolo Carlini wrote:
>
>> let's try again ;) In the light of discussion in Portland, which liked
>> Marc's idea of using std::decay in the unary common_type too, the below
>> seems good to go now, given that there are bad interactions with the
>> front-end bug we have got.
>
>
>    template<typename _Tp>
>      struct common_type<_Tp>
> -    { typedef _Tp type; };
> +    { typedef typename decay<_Tp>::type type; };
>
> (talking to myself)
> I guess decay never has sfinae-type errors, so it doesn't matter whether we
> have this typedef or derive from decay.

Depending on the final resolution of

http://cplusplus.github.com/LWG/lwg-active.html#2101

(the worst IMO) std::decay could produce an invalid instantiation, a
less aggressive
variant would make this sfinae-friendly (not type), but hopefully it
will always be well-formed.
I'm awaiting the further development of that issue.

- Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]